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

29
  • Abbreviations
  • Adding a Legal Status
  • Adding an Opponent / Debtor
  • Adding and Using Review Codes
  • Adding Hold Codes
  • Adding Multiple Images to an Activity Note
  • Adding New Activity Codes
  • Adding Payment Arrangements
  • Adding Wage and Bank Garnishments
  • Additional Opponent / Debtor Screens
  • Case File Basics
  • Counties, Clerks, and Court Locations
  • Creating a New Case File
  • Creating a New Client (Part 1 of 2)
  • Creating a New Client (Part 2 of 2)
  • Daily Dashboard
  • Editing Bad Phone Numbers and Addresses
  • Favorites Feature
  • File Status Codes
  • General Navigation Menus and Buttons
  • Image Sharing
  • Imaging (Paperless Office)
  • Importing New Files
  • Litigation Screens
  • Opponent Declares Bankruptcy Procedure
  • Opposing Attorneys
  • Status Bar
  • Understanding Settings Hierarchy
  • Workflows

Security

3
  • External Users
  • Resetting Passwords
  • Two-Factor Authentication

Add-Ons

2
  • Adding an Enhanced Email Signature
  • Microsoft Outlook Add-On

Document Management

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

Accounting

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

Preferences

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

Administration

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

Tools

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

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.