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(<any>)

<any>: 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.DATE(2008,9,1)

DATETIME

DATETIME(year,month,date,hour,minute,second)

year: NUMBER

Month: NUMBER

Date: NUMBER

hour: NUMBER

minute: NUMBER

second: NUMBER

DATETIME

Creates a new DATETIMEDATETIME(2008,9,1,12,20,00,"Asia/Kolkatta")

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 BooleanFALSE() -> FALSE

TRUE

TRUE()

-

BOOLEAN

Returns the True BooleanTRUE() -> TRUE

NOT

NOT(<input_boolean>)

<inpt_booelan>:BOOLEAN

BOOLEAN

Returns the inverse of the provided Boolean.NOT(FALSE()) -> TRUE

AVERAGE

AVERAGE(<input_1>,<input_2>..<input_n>),AVERAGE(<input_1>,<input_2>..<input_n>)

<input_1 to input_n>: NUMBER,

<input_1 to input_n>: Currency of the same Type

NUMBER,

CURRENCY

Returns the average of N numbers. Inputs can also be currency but if they are currency then they should all be of the same type if different type currencies are Averaged or a combination of currencies and numbers are averaged then we will throw out a runtime error.AVERAGE(1,3,5) -> 3AVERAGE(INR1,INR3,INR5) -> INR3AVERAGE(1,INR3,5) -> RuntimeError: IncompatibleCurrency Type OperationsAVERAGE(USD1,INR3) -> RuntimeError: Incompatible Currency Type Operations

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) -> 1USDMOD(11USD,5USD) -> 1USDMOD(11,5) -> 1MOD(11,5USD) -> Runtime ErrorMOD(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) -> 1MIN(1USD,3USD,5USD) -> 1USDMIN(1USD,3INR,5USD) -> RuntimeError:Incompatible Currency Type OperationsMIN(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) -> 1MAX(1USD,3USD,5USD) -> 1USDMAX(1USD,3INR,5USD) -> RuntimeError:Incompatible Currency Type OperationsMAX(1USD,3INR,5USD) -> RuntimeError:Incompatible Currency Type Operations

PRODUCT

PRODUCT(<entry_1>,<entry_2>,<entry_3>..<entry_n>),PRODUCT(<entry_1>,<entry_2>,<entry_3>..<entry_n>,<currency>)

<entry_n>: NUMBER<entry_n>: NUMBER

<currency>: CURRENCY(only one currency field allowed, position does not matter)

NUMBER

CURRENCY

Returns the product of all the entries provided as inputs.PRODUCT(1,2,3) -> 6PRODUCT(1,2,3USD) -> 6USDPRODUCT(1,2USD,3) -> 6USDPRODUCT(1,2USD,3USD) ->Runtime Error

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 ISTDate_2: 2018-1-2 12:20:00 ISTDATEDIFF(DATe_2,DATE_1,"HOUR") -> 24DATEDIFF(DATe_2,DATE_1,"DAY") -> 1DATEDIFF(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.

SUM

SUM(<entry_1>,<entry_2>,<entry_3>..<entry_n>),SUM(<currency_1>,<currency__2>,<currency_3>..<currency_n>)

<entry_n>: NUMBER,<currency_n>: CURRENCY

NUMBER,

CURRENCY

Returns the sum of all the entries provided as inputs.SUM(1,2,3) -> 6SUM(1,2,3USD) -> ERRORSUM(1USD,2USD,3USD) -> 6USDSUM(1USD,2INR,3USD) -> Runtime Error

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.

& AmpersandOppr

<entry_1> & <entry_2>

<entry_1>, <entry_2>:TEXT

TEXT

Returns the concatenated version of all the entries."K"&"au"&"sik" -> "Kausik"

CurrentUser

CurrentUser()

-

USER

Returns the Current User logged into the System on whose context the formulas are being fired.

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?