Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The condition builder options allow you to create and use dynamically predefined values for the specified types of columns, fields, tables, or condition operators.

The main use case of this functionality is filtering by fields of Date/Time typedate and time. The options facilitate filtering by using predefined values, such as "Yesterday", "Last Week before", "Next Month" and others.

Tip

The following options are implemented for the Date, DateTime, DateTime Specific column types:

  • Tomorrow
  • Today
  • Yesterday
These options are delivered within the platform

In the URL, options are displayed as opt:{option_id}.

Create an option


To create a new option, complete the steps below:

  1. Navigate to System Definition → Settings → Condition Builder → Builder → Options.
  2. Click New and fill in the fields.
  3. Click Save or Save and Exitexit to apply the changes.

Condition Builder Option form fields

FieldMandatoryDescription
TitleY

Specify the option name. It will be displayed in the condition builder values choice list.

ActiveNSelect this checkbox to make the option active. If not selected, this option is not displayed in the condition builder values choice list.
Field typeNYSpecify a column type to which this option is applicable. If not specified, then the option will be applicable to all field types created in the system.
Refer to tableN

Specify the table that the selected field in the condition builder will refer to.

This field appears when the Field type field value is Reference or List.

Use for fieldNSpecify a field to which this option is applicable. If not specified, then the option applies to all columns.
Use in tables NSpecify tables to which this option is applicable. You can specify more than one table. If not specified, the option applies to all tables.
Use with operatorsN

Specify condition operators to which this option is applicable. You can specify more than one type. If not specified, the option applies to all operators supported.

Tip

To find a list of operators supported by options, navigate here:

System Definition Setting → Condition Builder → Operators

To add new operators to this list, contact the vendor.


OrderNSpecify an option order. If more than one similar option are created, they will be applied according to the specified value in the ascending order.
ScriptN

Specify a script implementing the option logic.

Note

You can use Script IncludesInclude when defining option logic. To do thisso, complete the following steps:

  1. Create a script include.

    Code Block
    languagejs
    themeEclipse
    titledateWeekAfter
    linenumberstrue
    function getDateWeekAfter() {
    	const simpleDateTime = new SimpleDateTime();
    	simpleDateTime.addDays(7);
    	return simpleDateTime.getDate();
    }


  2. Import it using the ss.importIncludeScript(name) method.
Code Block
languagejs
themeEclipse
titleImporting Script Include
linenumberstrue
ss.importIncludeScript('getDateWeekAfter');
setResult(getDateWeekAfter()); 




Table of Contents
absoluteUrltrue
classfixedPosition
printablefalse