Understanding Expression Builder
Expression Builder (Expression Builder Portlet) enables you to define expressions that perform calculations, provide drop-down lists, or auto-populate data fields based on user-selected values. You can use these expressions to eliminate user calculation errors, data entry errors, and data entry work.
You can set data fields as required, read only, to accept certain values, as a message, or hidden. You can populate messages in one field, based on the value in another field or another portlet.
When defining expressions, you can also use the ASI Lookup Tables feature. These are tables that store the data that populate fields in the expression. You can add a record to an ASI table through an expression.
You can create expressions for Civic Platform, Citizen Access, or both. Citizen Access supports expressions for a variety of different form and portlets, including ASI, ASI Table, Contact, Fee, and Licensed Professionals.
Note:
Civic Platform uses the Event Manager and Scripting Engine (EMSE) to handle default form and portlet data fields. |
You can use the Expression Builder wizard to create expressions. You can also create expressions with the Event Manager and Scripting Engine (EMSE) scripting language. When you create expressions with the Expression Builder wizard, Civic Platform generates the EMSE script for that expression. You can use Expression Builder to edit an expression. You can also use EMSE to edit expressions directly in the scripting language. You can extend the functionality of expressions, beyond the functionality provided through the Expression Builder wizard, by enhancing the EMSE expression scripts (Customizing an Expression Script).
Example Use Case
Common expression use cases include: expressions to support field validation in licensed professional, ASI, and ASIT components, expressions to leverage the quantity of fee items, expressions to execute by order, expressions to gather the sum of field values and update fields meeting the criteria of the expression, expressions on ASIT components with ability to insert a row to ASIT, expressions used to populate other sections in the application online with the ability to edit those sections in the review page.
Example Use Case
Sample use cases for expressions in Citizen Access include:
validate fields in licensed professional, ASI, and ASI table components
populate fields hidden from public users
gather the sum of field values
update fields that meet the criteria of an expression
populate sections of the online application and make those sections editable in the review page.
Customizing an Expression Script
Civic Platform adds the ability to configure connections to external web services. When connected to an external web service, administrators can generate expressions that use data elements, from an external web service, as variables or data items. Civic Platform supports this feature for Citizen Access users.
Example Use Case
An agency administrator uses Expression Builder to build and execute an expression for the License Professional portlet. The EMSE script interacts with an external web service, such as the State Licensing Board, to check for the current status of a license and whether the Licensed Professional selected in a new application is valid.