app builder

Logic Blocks

Updated: October 13, 2020

Logic Blocks make up the invisible "back end" of your app. They create variables whose values are logical expressions, blocks of text, conditional statements, or lists.

It's possible to build a relatively simple app with zero Logic Blocks, but you'll likely need Logic Blocks for more advanced apps.

Expression Blocks

Expression Blocks create a variable that is True if the associated logical expression evaluates to True:

The variable able to vote is True if the number of years between Today and date_of_birth is greater than or equal to 18

Text Blocks (Text Variables)

Text Blocks create variables that are equal to a block of text (known as 'text variables'). For example, this text variable creates a block of text that represents a clause that may or may not be inserted in a document template: 

Note that you can add other variables inside a Text Block

Encapsulating text in variables allows you to conditionally add that text to document templates, because when you add a variable to a template you can specify that it should only be added under certain conditions.

Conditional Blocks

Conditional Blocks allow you to create a variable that has the value of one of a pre-determined set of variables or pieces of text (i.e. strings).

For example, imagine you want to create a template invoice where the price changes depending on what service the end-user selected:

This price, encapsulated in the variable price_for_document, can have one of three possible values as determined by your Conditional:

What is happening in the above Conditional:

  • If the service requested is "copyright claim", use price_1; else
  • If the service requested is "ip investigation", use price_2; else
  • Use price_3

Note: In this example, there are only 3 possible services the end-user can request. This means, after we define the price to use for two services, we can simply instruct the conditional to "fall back" on price_3 if neither of these two services is requested.

Contact us for support

Talk to a real person, quickly. We're available 9am - 5pm EST.