Skip to main content

Dynamic Display Rules

Show, hide, lock, or style controls in Yeeflow based on form data, workflow status, or other conditions.

Use Dynamic Display Rules to change a control’s visibility, editability, or appearance based on a condition.

For example, show a Booking reference field on a travel request when the requester selects Yes for Reserve Flight.

Set up Rule. it provides multiple condition elements to use:

  • Number/input Text

  • Expression

  • Function

  • Operation Symbols

Define Action. it provides examples of different types of dynamic actions:

  • Hide or Show

  • Read Only or Editable

  • Set a colored input

Multiple Conditions and Actions. Create multiple conditions for one action or multiple actions for one field.


Set up Rule

Select a control in the form designer. Under Appearance, open Dynamic display rules and click Create Rule.

Open the Expression Editor and define the condition. In the travel example, choose Reserve Flight from Workflow Variables and compare it with the value the form saves for Yes. Confirm the expression, then choose an action. Understand Expression Editor

You can create conditions based on:

Condition Element

Description

Number/input Text

Specify the value entered or selected or criteria with an Expression or Function.

Expression

Trigger the rule based on the expression element selected.

Workflow Variables: Each variable/field in your form can be picked;

Instance Context: General elements for all forms

Static Variables: Form status and task status

Metadata & User group & Position: System-wide data for each all forms.

Function

Trigger the rule based on the function formula selected. You can use nested formulas to set a rule condition.

String: Common-used formulas for text input variable.

Logical: iif, isNullorEmpty,not, isTrue, isFalse...

Date:DatePicker, dateAdd, DatePart, DateDiff, DateFormat,now

Mathematical:Round

Other: The formulas to get system's data or properties. E.g. Lookup a data list, get a user's attributes.

Operation Symbols

Use the operation symbols to complete a condition. E.g. plus(+), minus(-), equal(=), greater than (>) and etc.


Define Actions

Choose what happens when the rule is true. For visibility and editability, read the message below Action to verify what happens when the condition is false. Available actions depend on the selected control.

Action

Description

Hide

Hide a field/grid from the form when the rule is true.

(Note that you may also choose to collapse the space on the form when you hide grid.)

Display it on the form when the rule is not true.

Show

Display a field/grid on the form when the rule is true.

Hide it form the form when the rule is not true.

Read Only

Specify that a field should not accept data when the rule is true.

Become editable when the rule is not true.

Editable

Specify that a field should become editable when the rule is true.

Preview both conditions and confirm the control’s editing behavior.

Set Background

Specify a field to have a color background when the rule is true.

It includes: Red, Yellow, Blue and Black.

Set Border color

Specify a field with a border color when the rule is true.

It includes: Red, Yellow, Blue and Black.

Set Font color

Specify a field with a font color when the rule is true.

It includes: Red, Yellow, Blue and Black.

Define styles for both the normal and hover states of a field, including text color, background color, border type, radius, and shadow.

Note:

Dynamic Style is available for Text, Paragraph, Button, Container, and Icon controls. For the booking reference example, choose Show. To use a workflow state as the condition, see Show or hide controls based on workflow status.


Multiple Conditions and Actions

To show Booking reference for a flight or a hotel reservation, combine the conditions with OR in one Show rule. Use AND when all conditions must be true.

For one field or grid, you can create multiple conditions in a rule.

Keep conditions for the same property in one rule. If two rules apply opposite actions to the same property, their result can depend on which rules fire.

When you choose multiple conditions, you need specify whether all or only some of the conditions must be met to trigger the action.

E.g. When text1 is equal to ABC or number6 is greater than 5. Show the Grid 5.

You will see its results as:

Any condition is met to show Grid 5. No condition is met to hide Grid 5.

For one field, you can create multiple actions to run any or some actions when its rule is true.

You can add multiple actions for a Field only. There is only Show or Hide action for a Grid.

In this case, Yeeflow will execute these actions when any one or some rule(s) is met.

For example:

Action 1: When field_1 is equal to ABC, Show the field_5; and

Action 2: When field_2 is greater than 5, Read Only the field_5; and

Action 3: When field 3 is not equal to XY, Set Background the field_5 in Yellow.

Preview the form with neither, either, and both reservations selected. Switch back to neither and submit a test record to check how the form handles the existing value and required-field validation. Use app and data-source permissions to govern access to the underlying information.

Pro Tip:

Avoid rules that can both show and hide the same field. Combine the conditions so one rule determines the result.

For example:

Action 1: When field_1 is equal to ABC, Show the field_5; and

Action 2: When field_2 is greater than 5, Hide the field_5.


Copy and Paste Rules

Open Dynamic display rules on the source control and click the copy icon beside the rule you want to reuse.

On the destination control, open Dynamic display rules and click Paste rule. Check that the destination supports the action and that the expression refers to the intended variables. Test it with matching and nonmatching values.

Yeeflow’s Dynamic display rules dialog shows the Copy icon next to the Reserve Flight rule and the Paste rule button.


​

Did this answer your question?