Case Master Pro
  • Home
  • Software Features
    • Case Management
    • Billing & Accounting
    • CMP Imaging
    • Administration
    • Security
    • Reporting
    • Document Management
    • Software Integration
  • Add-ons
    • Email Automation
    • Integrated Payments
    • Client Dashboard
    • Payment Dashboard
    • Outside Counsel Login
    • EDI Interfaces
    • Direct Check Module
    • Data Conversion
  • Resources
    • Help Documentation
    • Help Videos
    • Support
    • Debt Collection Blog
    • Software Enhancements
  • About Us
    • About Case Master Pro
    • Testimonials
    • Contact Us
  • Free Demo
Select Page

General Case Management

35
  • Workflows
  • Understanding Settings Hierarchy
  • Status Bar
  • Returned Mail Feature
  • Renumbering or Deleting a Case File
  • Opposing Attorneys
  • Opponent Declares Bankruptcy Procedure
  • Misapplied Debtor Payments
  • Litigation Screens
  • Importing New Files
  • Imaging (Paperless Office)
  • Image Sharing
  • General Navigation Menus and Buttons
  • Financial Calculator
  • File Status Codes
  • Field Change History (Audit Log)
  • Favorites Feature
  • Editing Bad Phone Numbers and Addresses
  • Daily Dashboard
  • Creating a New Client (Part 2 of 2)
  • Creating a New Client (Part 1 of 2)
  • Creating a New Case File
  • Counties, Clerks, and Court Locations
  • Checking for Conflict Files and Problems
  • Case File Basics
  • Additional Opponent / Debtor Screens
  • Adding Wage and Bank Garnishments
  • Adding Payment Arrangements
  • Adding New Activity Codes
  • Adding Multiple Images to an Activity Note
  • Adding Hold Codes
  • Adding and Using Review Codes
  • Adding an Opponent / Debtor
  • Adding a Legal Status
  • Abbreviations

Security

4
  • Two-Factor Authentication
  • Security Features
  • Resetting Passwords
  • External Users

Add-Ons

3
  • Microsoft Outlook Add-On
  • Enhanced Email Automation
  • Adding an Enhanced Email Signature

Document Management

11
  • Merging PDF Templates
  • Document User Prompts (Ask Fields)
  • Document Letterheads
  • Document Generation Selection Options
  • Document Fragments
  • Creating Spreadsheet Templates
  • Building Document Expressions
  • Batch Documents
  • Basic Document Generation
  • Advanced Document Generation
  • Adding a Signature

Accounting

16
  • Void Checks
  • Transactions Check Register
  • Searching for Checks
  • Preparing and Finalizing Bills
  • Post Direct Payment to Client
  • Misapplied Debtor Payments
  • How to Set Up Hourly Billing
  • Generating a Client Remittance Report
  • Financial Calculator
  • Entering Client Invoice Payments and Unpaying Bills
  • Entering and Printing Checks
  • Contingency Rates and Buckets
  • Balance Calculation Basics
  • Adjusting Commercial Rates and Suit Fees
  • Adding Wage and Bank Garnishments
  • Accounting Reports

Preferences

3
  • Resetting Passwords
  • Enabling Pop-Ups
  • Adding Top Buttons to Grids

Administration

15
  • User Defined Fields
  • Terminology
  • Status Bar
  • Resetting Passwords
  • Renumbering or Deleting a Case File
  • Reassigning Reviews, System Users, and Default Users
  • Image Restore
  • Company Settings: Company Tab
  • Batch Internal Status Updates
  • Automations
  • Assigning Attorney Bar Numbers
  • Adding New Activity Codes
  • Adding and Using Review Codes
  • Adding a Legal Status
  • Abbreviations

Tools

4
  • Importing New Files
  • Importing Batch Images
  • Custom Reporting
  • Adding a Legal Status

CMPOnline Support

1
  • SOS Support Line Access Instructions
View Categories

Building Document Expressions

Basics

Document expressions in CMPOnline use the C# programming language and its syntax. This document is not meant to teach C# – rather, it is meant to help users of CMPOnline with little to no programming experience create simple document expressions.

Return

To start, we will look at the return statement. The return statement is what we will use to tell CMPOnline that this is what we want to show when generating a document with this expression.

Example:

return “Demand Letter”;

This statement will insert “Demand Letter” (without the quotation marks) into the document.

Using Merge Fields

The power of CMPOnline document expressions comes from the ability to use and manipulate existing merge fields. You have the ability to use mathematical expressions with our merge fields, add a string of words to a merge field to give it context, evaluate if / then statements, and more.

Please note that by default, document expressions are evaluated as “strings” or text fields.  In order to perform mathematical calculations, we recommend that you wrap the field in the “Zero” function to force it to evaluate to a number.  All expressions must return a value of some kind to be considered valid, even if that value is an empty string.

Examples:

return [FileNumber];

This statement will insert the current file number into the document.

return (Zero([PrincipalAmount]) + 100).ToString(“c”);

This statement will take the current Principal Amount on the file and add 100 to it. This statement can be changed to subtract this amount (-), multiply (*), or divide (/). You can also change that amount added to any numerical value.

This can also be written as:

return string.Format(“{0:c}”, Zero([PrincipalAmount]) + 100);

return (Zero([PrincipalAmount]) + Zero([FeesAmount])).ToString(“c”);

Similar to the example above, this example adds two items together. In this case, it is two merge fields being added together. This can be done with any number of merge fields, as long as they are numeric.

return “This is the principal amount: ” + [PrincipalAmount];

This expression adds a string before the merge field. Strings can be added before and after by using quotations and a plus sign.

If / Then Example:

if (Zero([CurrentBalance]) > 5000) 

return “This balance is over 5,000!”;

else

return “This is a small balance file!”;

This expression is more complex, spanning 4 lines. In this example, a if / then statement is used directing the system to output “This balance is over 5,000!” if the balance is greater than 5000 or “This is a small balance file!” if the balance is less than or equal to 5000.

Testing

It is important to test all expressions before using them within documents. Testing an expression allows you to ensure there are no syntax errors and the outcome is what you expect. 

  • To test a document expression, click “Test” above the document expression.
    (Note: Make sure you are on a file that has the fields you are currently testing populated in the system.)
    • If you receive a “Success!” result, ensure the output is correct and then save.
    • If you receive an error, check your expression again for syntax errors.
      Some common errors are misspelled words, no brackets around merge fields, and no semicolons. 
  • To test your new expression within a document template, you must save the expression and then enter into a template. You are not able to test new expressions if your template is already open in your browser.

If after testing you still receive an error and you cannot identify the issue, please contact us using the contact support icon within CMPOnline or through our information below and a representative will get with you shortly to assist. 

Complex Expression Examples:

“CourtCaseNumber”

if ([CaseNumber].ToString()!=””) return “\n” + [VenueCounty].ToString() + ” County Court Case No.  ” + [CaseNumber].ToString() ;

return “”;

JudgmentLessJudgmentPayments

return string.Format(“{0:C}”,Zero([FinalJudgmentAmount])-Zero([PostJudgmentDebtorPayments]));

TotalDays

return (DateTime.Today – Convert.ToDateTime([InterestDate])).TotalDays;

Firm Pleading Signature

return [CompanyStreet] + “\n” + [CompanyCityStateZip] + “\n” + [CompanyPhoneNum] + “\n” + [CompanyEmailAdresss] + “\n\n\n” + “By:____________________________” + “\n” + ”       ” +  [AttorneyFullName] + “, Esq.” + “\n” + ”       Fla. Bar No. ” + [AttorneyBarNumber];

Document Expressions Video Highlight

Additional Features, Document Integration, Document Merge, Documents, Microsoft Excel, Microsoft Outlook, Microsoft Word, Paperless Office

Share This Help Document:

  • Facebook
  • X
  • LinkedIn
Table of Contents
  • Basics
  • Return
  • Using Merge Fields
  • Testing
  • Document Expressions Video Highlight

CMPOnline by Case Master Pro
P.O. Box 252
Georgetown, FL 32139
phone: (386) 675-0177

Contact Us

  • Facebook
  • LinkedIn
  • YouTube
  • Twitter
  • RSS

Software Features

  • Case Management
  • Billing & Accounting
  • CMP Imaging
  • Administration
  • Reporting
  • Document Management
  • Software Integration

Add-on Features

  • Email Automation
  • Payment Processor Integration
  • Client Dashboard
  • Payment Dashboard
  • Outside Counsel Login
  • EDI Interfaces
  • Direct Check Module
  • Data Conversion

Discover the Features Every Law Firm Needs

  • About Our Legal Case Management Software Company
  • Case Management Software
  • Debt Collection Software with Custom Reporting
  • Legal Billing Software
  • Legal Software Administration
Copyright © 2005-2025 Case Master, Inc. All rights reserved.