SmartBuilder Logical Expression Overview


SmartBuilders take advantage of logical expressions that allow you to customize the user interface and the behavior of the SmartBuilder. You can use logical expressions in SmartBuilders to dynamically:

  • Show or hide Pages and Group Boxes in the SmartBuilder dialog box based on the values that user has entered or selected in other controls.
  • Enable or disable controls that accept input (text boxes, drop-down menus, etc.) based on the values that user has entered or selected in other controls.
  • Determine whether or not a SmartBuilder action should be executed based on the values that user has entered or selected in other controls.

SmartBuilder logical expressions are written in JavaScript – a well-known scripting language that is used widely on the Internet. Each logical expression you create will resolve to either true or false and will control the user interface and behavior of the SmartBuilder.

The following table provides an overview of the different ways logical expressions are supported in SmartBuilders.

How can I reference SmartBuilder controls in my logical expressions?

Logical expressions can dynamically read-in the value from any control in the SmartBuilder by referring to the ID of the control in the expression and prefixing it with a dollar sign ('$').

For example:

$company_industry == "Life Sciences"

This expression will resolve to true if the SmartBuilder contains a control with the ID company_industry and value currently entered or selected in that control is Life Sciences. If all of these conditions are not met, then this expression will resolve to false.

What are some example expressions?

The table below provides examples of various logical expressions. This example assumes we are creating a SmartBuilder for a Sales Proposal document, and our SmartBuilder user interface contains controls to gather standard information about the proposal and the target client.

IMPORTANT: When creating logical expressions, you must be sure to use straight quotes (") and not curly quotes (“). If curly quotes are used, the SmartBuilder will be unable to evaluate the expression and it will be ignored.

Article modified


Please sign in to leave a comment.
Powered by Zendesk