Functions

Updated 1 month ago by Nandini

Functions unlike methods are top level and are not chained but are independent expression sub blocks. Below you will find a list of functions in Kissflow:

Function

Syntax

Input Type

Output Type

Explanation

ISBLANK

ISBLANK(<field>)

<field>: ANY

BOOLEAN

Check if a field is empty or not.

EMPTY values are "", null, []ISBLANK(<field>) = True

DATE

DATE(year,month,date)

year: NUMBER

Month: NUMBER

Date: NUMBER

DATE

Creates a new DATE.

Example:

DATE(2008,9,1)

DATETIME

DATETIME(year,month,date,hour,

minute,second,timezone)

year: NUMBER

Month: NUMBER

Date: NUMBER

hour: NUMBER

minute: NUMBER

second: NUMBER

timezone: TEXT

DATETIME

Creates a new DATETIME value in GMT by default. An Optional Timezone text can be provided which is a valid Timezone name based on the IANA Timezone database in order to create a DATETIME in the provided timezone.

Examples:

DATETIME(2008,9,1,12,20,00) -> 12 Jan 2008 12:20 pm GMT.

DATETIME(2008,9,1,12,20,00,"Asia/Kolkata")-> 12 Jan 2008 12:20 pm IST.

RAND

RAND()

NUMBER

Creates a random number

RANNDBETWEEN

RANDBETWEEN(From,To)

From: NUMBER

To: NUMBER

NUMBER

Creates a random number between given <from> and <to> number

DATEFROMTEXT

DATEFROMTEXT(<dateText>)

Dt_Text: TEXT

DATE

Creates a Date from given <dateText>Dt = DATEFROMTEXT(“2018/12/11”)

FALSE

FALSE()

-

BOOLEAN

Returns the False Boolean

FALSE() -> FALSE

TRUE

TRUE()

-

BOOLEAN

Returns the True Boolean

TRUE() -> TRUE

NOT

NOT(<input_boolean>)

<inpt_booelan>:BOOLEAN

BOOLEAN

Returns the inverse of the provided Boolean.

NOT(FALSE()) -> TRUE

MOD

MOD(<dividend>,<divisor>),

MOD(<dividend_cur>,<divisor>)

<dividend>:NUMBER

<dividend>:NUMBER

<divisor>:NUMBER

<dividend_cur>:CURRENCY

<divisor>: NUMBER

NUMBER,

CURRENCY

Returns the remainder when <dividend> is divided by <divisor>. When <dividend> is a currency then <reminder> will also be a currency of the same type.

MOD(11USD,5) -> 1USD

MOD(11USD,5USD) -> 1USD

MOD(11,5) -> 1

MOD(11,5USD) -> Runtime Error

MOD(11INR,5USD) -> Runtime Error

MIN

MIN(<entry_1>,<entry_2>,<entry_3>..<entry_n>)

MIN(<currency_1>,<currency__2>,<currency__3>..<currency_n>)

MIN(<dt_1>,<dt_2>,<dt_3>..<dt_4>)

MIN(<dtt_1>,<dtt_2>,<dtt_3>..<dtt_4>)

<entry_n>: NUMBER

<currency_n>: CURRENCY

<dt_n>: DATE

<dtt_n>: DATE

NUMBER

CURRENCY

DATE

DATETIME

Returns the minimum of the given entries. Can work exclusively for numbers or exclusively for currencies of the same type. Won’t work when currencies are entered in different types.

MIN(1,3,5) -> 1

MIN(1USD,3USD,5USD) -> 1USD

MIN(1USD,3INR,5USD) -> RuntimeError:Incompatible Currency Type Operations

MIN(1USD,3INR,5USD) -> RuntimeError:Incompatible Currency Type Operations

MAX

MAX(<entry_1>,<entry_2>,<entry_3>..<entry_n>)

MAX(<currency_1>,<currency__2>,<currency__3>..<currency_n>)

MAX(<dt_1>,<dt_2>,<dt_3>..<dt_4>)

MAX(<dtt_1>,<dtt_2>,<dtt_3>..<dtt_4>)

<entry_n>: NUMBER

<currency_n>: CURRENCY

<dt_n>: DATE

<dtt_n>: DATE

NUMBER

CURRENCY

DATE

DATETIME

Returns the minimum of the given entries. Can work exclusively for numbers or exclusively for currencies of the same type. Won’t work when currencies are entered in different types.

MAX(1,3,5) -> 1

MAX(1USD,3USD,5USD) -> 1USD

MAX(1USD,3INR,5USD) -> RuntimeError: Incompatible Currency Type Operations

MAX(1USD,3INR,5USD) -> RuntimeError: Incompatible Currency Type Operations

DATEDIFF

DATEDIFF(<date_1>,<date_2>,<resolution>,<honour_holidays>,<extra_holiday_list>),

DATEDIFF(<dt_1>,<dt_2>,<resolution>,<honour_holidays>,<extra_holiday_list>)

<date_1>,<date_2>:DATE<resolution>: TEXT<honour_holidays>: BOOLEAN (optional default:True)<extra_holiday_list>: LIST[DATE] (optional default:[])""<dt_1>,<dt_2>:DATETIME<resolution>: TEXT<honour_holidays>: BOOLEAN(optional default:True)<extra_holiday_list>: LIST[DATE] (optional default:[])

NUMBER

Returns the difference between two dates in the term of resolution.

Date_1: 2018-1-1 12:20:00 IST

Date_2: 2018-1-2 12:20:00 IST

DATEDIFF(DATe_2,DATE_1,"HOUR") -> 24

DATEDIFF(DATe_2,DATE_1,"DAY") -> 1

DATEDIFF(DATe_2,DATE_1,"YEAR") -> 0.0027

<extra_holiday_list> should be a LIST{DATE}.

NOW

NOW()

-

TODAY

TODAY()

-

DATE

Returns today as a DATE type.

CONCATENATE

CONCATENATE(<entry_1>,<entry_2>,<entry_3>..<entry_n>)

<entry_n>:TEXT

TEXT

Returns the concatenated version of all the entries.

CONCATENATE("Welcome", “ Home”) -> "Welcome Home"

CURRENCY

CURRENCY(<val>,<curr_code>)

<val>: NUMBER<cur_code>:TEXT

CURRENCY

Creates a currency based on the value and currency code provided.

LastCompletedStep

LastCompletedStep()

-

STEP

Returns the step object of the last completed step.

Number

NUMBER(<number_text>)

<number_text>: TEXT

NUMBER

Returns the number equivalent to the numeric characters in <number_text> if the <number_text> has non numeric chars then there will be a runtime error.

NUMBER("12.1") -> 12.1

Here are more articles about expressions:


How did we do?