Writing Syntax for Conditions

Writing Syntax for Conditions

For a review of Conditions related to Scenarios please refer to the article here. Conditions, in Scenarios, take the form of a comparison that can create a filter in your table structure.

If you are ever doubting the name of a column that needs to be used in an action, you can type CTRL+SPACE to have the full list of columns available to you displayed. Alternatively, you can start typing and the valid column names will auto-complete.

Allowed Conditions Syntax

Standard comparison operators include: =, >, <, >=, <=, !=. You can also use the LIKE or NOT LIKE operators and the % or * values for wildcards for string comparisons. The % and * wildcard operators are equivalent within Cosmic Frog (though, best practice is to use the % wildcard symbol since this is valid in the database code). If you have multiple conditions, the use of AND / OR operators are supported. The IN operator is also supported for comparing strings.

Cosmic Frog will color code syntax with the following logic:

  • Column Names – Blue
  • Logic Operators – Green
  • Strings – Orange
  • Numeric Operators / String Enclosures – Black

Following are some examples of valid condition syntax:

Business Goal: Condition Syntax

  • Filter for items with unit value above 45: unitvalue>45
  • Apply condition for product with name RM_01: productname=’RM_01′
  • Reference products with demand over 1,000 units including 1,000: quantity>=1000
  • Filter for all Distribution Centers by prefix: facilityname LIKE ‘DC_%’
  • Filter for all Distribution Centers by prefix: facilityname LIKE ‘DC_*’
  • Filter for all Facilities that are not Distribution Centers by prefix: facilityname NOT LIKE ‘DC_%’
  • Filter for all Facilities that are not Distribution Centers by prefix: facilityname NOT LIKE ‘DC_*
  • Filter for all Facilities that are in a list of known records: facilityname IN (‘DC_1’, ‘DC_2’, ‘DC_3’)

Writing Syntax for Conditions

For a review of Conditions related to Scenarios please refer to the article here. Conditions, in Scenarios, take the form of a comparison that can create a filter in your table structure.

If you are ever doubting the name of a column that needs to be used in an action, you can type CTRL+SPACE to have the full list of columns available to you displayed. Alternatively, you can start typing and the valid column names will auto-complete.

Allowed Conditions Syntax

Standard comparison operators include: =, >, <, >=, <=, !=. You can also use the LIKE or NOT LIKE operators and the % or * values for wildcards for string comparisons. The % and * wildcard operators are equivalent within Cosmic Frog (though, best practice is to use the % wildcard symbol since this is valid in the database code). If you have multiple conditions, the use of AND / OR operators are supported. The IN operator is also supported for comparing strings.

Cosmic Frog will color code syntax with the following logic:

  • Column Names – Blue
  • Logic Operators – Green
  • Strings – Orange
  • Numeric Operators / String Enclosures – Black

Following are some examples of valid condition syntax:

Business Goal: Condition Syntax

  • Filter for items with unit value above 45: unitvalue>45
  • Apply condition for product with name RM_01: productname=’RM_01′
  • Reference products with demand over 1,000 units including 1,000: quantity>=1000
  • Filter for all Distribution Centers by prefix: facilityname LIKE ‘DC_%’
  • Filter for all Distribution Centers by prefix: facilityname LIKE ‘DC_*’
  • Filter for all Facilities that are not Distribution Centers by prefix: facilityname NOT LIKE ‘DC_%’
  • Filter for all Facilities that are not Distribution Centers by prefix: facilityname NOT LIKE ‘DC_*
  • Filter for all Facilities that are in a list of known records: facilityname IN (‘DC_1’, ‘DC_2’, ‘DC_3’)

Have More Questions?

Scalability Icon

Contact Support

Get in touch
Scalability Icon

Contact Sales

Get in touch
Scalability Icon

Visit Frogger Pond Community

Visit our Community