Comparison

Updated 1 month ago by Nandini

Comparison of two values are possible only if they are of the same data type. The following comparison operators are available in Kissflow.

  • =
  • <> or !=
  • >
  • <
  • >=
  • <=

Here is a table that matches the comparison operator:

Data Type

Supported Operators

TEXT

=, <>, !=

NUMBER

=,<>,!=, <, >, >=, <=

CURRENCY

=,<>,!=, <, >, >=, <=

DATE

=,<>,!=, <, >, >=, <=

DATETIME

=,<>,!=, <, >, >=, <=

BOOLEAN

=,!=,<>

USER

=,!=,<>

In the case of CURRENCY, the compared values should also be of the same currency code else an error will be thrown to the end user.
CURRENCY(5,"USD") > CURRENCY(10,"INR")
Will throw an error in runtime.
In the case of DATETIME comparison will be allowed even when the two values are not in the same time zone.
DATETIME(2018,1,1,12,20,00,"Asia/Kolkatta") > DATETIME(2018,1,1,12,20,00,"America/Chicago")
Will not only be allowed, it will work as well.
DATETIME(2018,1,1,12,20,00,"Asia/Kolkatta") > DATETIME(2018,1,1,12,20,00,"America/Chicago")
Will not only be allowed, it will work as well.
DATE and DATETIME comparisons will not be allowed.
DATE(2018,1,1) > DATETIME(2017,12,31,00,00,00,"Asia/Kolkatta")
Will throw an error in design time.
The result of a comparison statement will always be a Boolean.
4 > 5 -> TRUE()

Here are more articles about expressions:


How did we do?