Versions Compared

Key

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

NumberCompareCondition checks if the value in the provided fieldpath matches the value and mode (field value: 20 translated to this condition is value:20 mode: equals) and triggers this very moment e.g. check if amount sold is 100 to then e.g. apply discount flag. 

Number compare works for Geo Points but requires two conditions (number compare for lat; number compare for lon).

Include Page
TERMS:Business Rule Condition: Number Compare
TERMS:Business Rule Condition: Number Compare

(lightbulb) Triggers when a number field value has the defined value. It can be useful to check prices, amounts of products sold, or users logged in (if tracked in number fields). 

...

Select the condition and provide the values. 

Property

Value

kind

NumberCompareCondition

fieldpath

layerId.fieldId

Details on accessing field values, specifically fieldpath starts lowercase

Supports JSON path syntax which you can test here: https://jsonpath.com.

value

Provide a number value, whole numbers or decimals to check against. 

mode

Select the mode, which mirrors mathematical expressions. 

  • less than: < 20 means 0-19

  • less than equal: <= 20 means 0-20 (including 20)

  • equal: =20 means 20

  • greater than: > 20 means 21 and more

  • greater than equal: >= 20 means 20 and more (including 20)

Enum: "LessThan" "LessThanEqual" "Equal" "GreaterThanEqual" "GreaterThan"

...

Where 100 Products Sold?

Code Block
{
	"kind": "NumberCompareCondition",
	"value": 20,
	"fieldPath": "products.amountSelled",
	"mode": "GreaterThanEqual"
}

...