FAQ

How to convert non-text Clio data

July 27, 2021

When you pull data from Clio into your Afterpattern app, all that data arrives as text datatype. You must convert Clio data into the proper datatype if you want to:

  • Format dates, numbers, or currency;
  • Perform logical expressions with the Clio data; or
  • Check off checkboxes on a PDF template.

To do either of the above, you'll need to convert any data that is pulled from a Clio Picklist, Checkbox, Date, or Number field.

How it works

It's a relatively simple, if tedious, process:

  1. Pull the Clio data into your app and build a mechanism for the end-user to specify which Contact or Matter they want to use (learn more);
  2. Use an Expression Block to create a new variable that is equal to your Clio non-text variable converted into the appropriate datatype.

Picklist

Your Clio picklist value arrives in your Afterpattern app as text. So, if all you want to do is add that text to a document template or page block you do not need to do anything special. However, if you want to use the picklist value in a logical expression or to check off a checkbox, you must convert it into a boolean (True/False) datatype variable. You can do this with an Expression Block.

How it works:

  • Step 1: Add an Expression Block
  • Step 2: In the first dropdown, select your Clio picklist variable
  • Step 3: In the second dropdown, select "equals", and in the third dropdown type one of your picklist values exactly as it is written in Clio (you will repeat this 3 step process for each picklist value):

Your new variable is a boolean datatype and is True of False depending on whether the particular picklist value is selected in Clio. You can use this new variable in logical expressions or to check off checkboxes.

Checkbox

In Clio, a Checkbox field has a value of either 'yes' or 'no':

To use this variable in a logical expression, you must first convert it from text datatype into a boolean (True/False) datatype variable. You can do this with an Expression Block.

How it works:

  • Step 1: Add an Expression Block
  • Step 2: In the first dropdown, select your Clio checkbox variable
  • Step 3: In second dropdown, select "equals", and in the third dropdown type "true" (all lowercase):

Your new variable is a boolean datatype and it is True or False depending on whether the checkbox is checked inside Clio. You can now use this new variable in logical expressions.

Date

In Clio (US), a Date field looks like its formatted as MM/DD/YYYY:

...However, technically its really formatted as YYYY-MM-DD.

To use this variable in a logical expression (e.g. to perform date calculations with it), you must first convert it into a date datatype. You can do this with an Expression Block.

How it works

  • Step 1: Add an Expression Block
  • Step 2: In the first dropdown, select your Clio date variable
  • Step 3: In the second dropdown, select "as a date, given its formatted as YYYY-MM-DD":

Your new variable is of date datatype. You can use this new variable to perform date calculations.

Number

To use Clio number variables in your Afterpatter app as numbers (e.g. to perform numeric calculations with that variable), you must convert it in your app from text to number datatype variable. This is easy, just add an Expression Block, select the Clio number variable, and then select "as a number":

Your new variable is of a number datatype.

Hire an Afterpattern expert

Go from idea to launch in weeks.

View services