What to do if expression is blank or not well-formed

July 26, 2021

You may see this error when you try to preview or activate your app (see image below). This error is caused by a blank or not well-formed logical expression:

What does this error mean? 

An expression is created with an expression editor, and an expression editor is found in many places throughout your app including:

  • When you click on the "conditionally display" toggle on the footer of a page block;
  • Logic blocks, specifically expression and conditional blocks;
  • When you click the "show if" toggle for a particular question on a question page block;
  • When you click the "conditionally insert" toggle for a variable on a document template (Word or PDF).

An expression is blank when it is empty. For example, if you click "conditionally display" on the footer of a page block but you don't write an expression.

An expression is not well-formed when it is only partially complete or when it is logically inconsistent. In this case, there will be a hazard icon next to the expression:

How do you find the blank or not-well formed expression?

The error message provides details about where you can find the blank or not well-formed expression. Often it will give you the name of the variable that is being assigned (or "defined") but the blank or not well-formed expression.

For example, this error message is telling us to go find the expression that defined the variable called `full name`:

When you find the broken expression, how do you fix it?

This depends on what exactly is wrong with your expression.

If the expression is blank (i.e. empty), you can either write a new expression or remove the expression entirely.

If the expression is not well-formed, add or remove elements from the expression until the hazard icon disappears.

Hire an Afterpattern expert

Go from idea to launch in weeks.

View services