Javascript Condition Formatter

The Javascript Condition Formatter allows you to dynamically transform column data based on user-defined conditions, offering a flexible way to format data in your lists.

Configure javascript condition

To add this Formatter, go to the element's properties under Formatter and choose Javascript Condition in the Formatter field.

When adding Javascript Condition, you will see the following field available for configuration:

  • Conditions: Define the conditions under which specific formatting should be applied. Each row in the configured datalist column will be processed based on these conditions.
    Use {fieldId} to retrieve the column value. {fieldId} is a Form field ID from the specified form in the current datalist. For example, the form field ID "name" should be written as {name}.
    Hash variables can also be used within the conditions. See the example below.

    It will result in the following:

    The first matched condition will take precedence when there is a conflict or multiple matches between conditions.

    Result:

 
Created by Julieth Last modified by Aadrian on Dec 13, 2024