Master list of methods

Updated 3 weeks ago by Nandini

Here you will find a master list of all the methods/functions that will be supported in Kissflow and also there will be explanations on what each of these functions does.

Method

Syntax

Input Type

Output Type

Explanation

toUpperCase

Txt.toUpperCase()

Txt: TEXT

TEXT

Case of the TEXT will be changed to uppercase.

USAGE:"ant" -> "ANT""Elephant" -> "ELEPHANT"(This should work for all unicode characters which support capitalization. )

toLowerCase

Txt.toLowerCase()

Txt: TEXT

TEXT

Case of the TEXT will be changed to lowercase.USAGE:"AnT" -> "ant""ELEPHANT" -> "elephant"(This should work for all unicode characters which support capitalization. )

trim

Txt.trim()

Txt: TEXT

TEXT

Starting and trailing spaces from the original TEXT will be removed. However space between letters will be preserved.USAGE:" a nt " -> "a nt"

replace

Txt.replace(<find>,<replace>)

Txt.replace(<find>,<replace>,

<occurance_no>)

Txt: TEXT<find>:

TEXT<replace>:

TEXT<occurrence_no>: NUMBER

TEXT

Replaces <find> in Txt with <replace>. By default will replace all occurrences, unless the occurrence number is specified as a number.USAGE:Txt = "Mummy"Txt.replace("m","c") -> MuccyTxt.replace("m","c",1) -> MucmyTxt.replace("m","c",2) -> MumcyPlease note replace is case sensitive.

find

Txt.find(<find>)

Txt.find(<find>,<from_index>

Txt.find(<find>,<from_index>,<ignore_case>)

Txt: TEXT

<find>: TEXT

<from_index>:NUMBER

<ignore_case>: BOOLEAN

NUMBER

Returns the index of the first occurance of <find> equal to and beyond <form_index> in a given string. Returns 0 if it is not present.USAGE:Txt = "Mummy"Txt.find("m") -> 3Txt.find("m",4) -> 4Txt.find("z") -> 0Txt.find("m",1,False()) -> 3Txt.find("m",1,True()) -> 1Find will be case sensitive when <ignore_case> is False(). When it is True() it will be case insensitive. By Default when not given it is assumed to be False().

substring

Txt.substring(<from_index>,<to_index>)

Txt: TEXT

<from>:NUMBER

<to>:NUMBER

TEXT

Returns the substring between position <from> and <to> as a TEXT.USAGE:Txt = "Mummy"Txt.substring(1,3) -> "Mum"Txt.substring(1,200) -> "Mummy"Txt.substring(200,400) -> ""Txt.substring(3,1) -> "muM"

length

Txt.length()

Txt: TEXT

NUMBER

Returns the length of a TEXT.USAGETxt = "Kausik"Txt.length() -> 6

round

Num.round()

Num.round(<digits_count>)

Cur.round()

Cur.round(<digits_count>)

Num:NUMBER

<digits_count>:NUMBER

Cur:CURRENCY

<digits_count>:NUMBER

NUMBER

CURRENCY

"Rounds the given number/currency up or down to the nearest decimal point.N= 1.234N.round() - > 1N.round(2) - > 1.23N= 1.237N.round(2) - > 1.24C = CURRENCY(10.234, ""USD"")C.round() - > CURRENCY(10,""USD"")C.round(2) - > CURRENCY(10.23,""USD"")Digits count is assumed to be 0 when not given."

rounddown

Number.rounddown()

Number.rounddown(<digits_count>)

Cur.rounddown()

Cur.rounddown(<digits_count>)

Num:NUMBER

<digits_count>:NUMBER

Cur:CURRENCY

<digits_count>:NUMBER

NUMBER

CURRENCY

Rounds the given number down to the nearest decimal pointN= 1.234N.rounddown() - > 1N.rounddown(2) - > 1.23C = CURRENCY(10.234, "USD")C.rounddown() - > CURRENCY(10,"USD")C.rounddown(2) - > CURRENCY(10.23,"USD")Digits count is assumed to be 0 when not given.

roundup

Number.roundup()

Number.roundup(<digits_count>)

Cur.roundup()

Cur.roundup(<digits_count>)

Num: NUMBER

<digits_count>: NUMBER

Cur: CURRENCY

<digits_count>: NUMBER

NUMBER

CURRENCY

"Rounds the given number up to the nearest decimal pointN = 1.234N.roundup(2) - > 1.24C = CURRENCY(10.234, ""USD"")C.roundup() - > CURRENCY(11,""USD"")C.roundup(2) - > CURRENCY(10.24,""USD"")Digits count is assumed to be 0 when not given."

ceil

Num.ceil()

Num.ceil(<unit>)

Cur.ceil()

Cur.ceil(<unit>)

Num - NUMBER

<unit> - NUMBER

Cur: CURRENCY

<unit> - NUMBER

NUMBER

CURRENCY

"Number will be rounded up as multiples of <unit>.Num = 1.28Num.ceil(.5) -> 1.5Num.ceil(10) -> 10C = CURRENCY(10.234, ""USD"")C.ceil() - > CURRENCY(11,""USD"")C.ceil(2) - > CURRENCY(12,""USD"")Unit is assumed to be 1 when not given."

floor

Num.floor()

Num.floor(<unit>)

Cur.floor()

Cur.floor(<unit>)

Num - NUMBER

<unit>- NUMBER

Cur: CURRENCY

<unit> - NUMBER

NUMBER

CURRENCY

Number will be rounded down as multiples of <unit>.Number = 1.28Number.floor(.5) -> 1.0Number.floor(10) -> 0C = CURRENCY(10.234, ""USD"")C.floor() - > CURRENCY(10,""USD"")C.floor(2) - > CURRENCY(10,""USD"")Unit is assumed to be 1 when not given.

abs

Num.abs()Cur.abs()

Num: NUMBER

Cur: CURRENCY

NUMBER

CURRENCY

Returns the absolute value of a numberN = 2N.abs() -> 2N = -2N.abs() -> 2C = CURRENCY(10, ""USD"")C.abs() -> CURRENCY(10, ""USD"")C = CURRENCY(-10, ""USD"")C.abs() -> CURRENCY(10, ""USD"")

toText

Num.toText(<format_string>)

Cur.toText(<format_string>)

Dt.toText(<format_string>)

Dtt.toText(<format_string>)

Num: NUMBER<format_string>:

TEXT""CUR: CURRENCY<format_string>:

TEXT""Dt: DATE<format_string>:

TEXT""Dtt: DATETIME<format_string>: TEXT

TEXT

The output will show the number as a Text in the format mentioned.Number = 123Number.toText() -> "123"Number.toText("0.00") -> "123.00"https://support.office.com/en-us/article/text-function-20d5ac4d-7b94-49fd-bb38-93d29371225c

code

Cur.code()

Cur: CURRENCY

TEXT

Returns the currency code of the given Currency.C = CURRENCY(10, "USD")C.code() -> "USD"

value

Cur.value()

Cur: CURRENCY

NUMBER

Returns the Number value of the given Currency.C = CURRENCY(10, "USD")C.value() -> 10

convert

Cur.convert(<conversion_ratio>,<new_type>)

Cur:CURRENCY

<conversion_ratio>:NUMBER

<conversion_type>:TEXT (valid Currency_Code)

CURRENCY

Converts the currency from 1 type to another.C = CURRENCY(5, "USD")C.convert(60,"INR") -> CURRENCY(300, "INR")

offset

Dt.offset(<offset_number>,<offset_string>,<exclude_list>)

Dtt.offset(<offset_number>,<offset_string>,<exclude_list>)

"Dt: DATE<offset_number>: NUMBER<offset_string>: TEXT<exclude_list>: LIST{DATE}""Dtt: DATETIME<offset_number>: NUMBER<offset_string>: TEXT<exclude_list>: LIST{DATE}"

DATE

DATETIME

The output will compute the offset from given date datetime.Date.Offset(10,""D"") offset 10 daysDate.Offset(10,""Y"") offset 10 yrsDate.Offset(10,""M"") offset 10 monthsDate.Offset(-10,""M"") offset by 10 months beforeDate.Offset(1.5,""M"") offset by 1.5 monthsDatetime.Offset(10,""h"") offset by 10 hoursDatetime.Offset(10,""m"") offset by 10 minsDatetime.Offset(10,""s"") offset by 10 secs<exclude_list> should be a LIST{DATE}.

eom

Dt.eom()Dtt.eom()

Dt: DATEDtt: DATETIME

DATE

Returns the end of the month date for the given date/datetime.Dt = DATE(2018,8,11)dt.eom() -> DATE(2018,8,31)

week

Dt.week(<week_start_index>)

Dt.week(<week_start_index>)

Dtt.week()

Dtt.week(<week_start_index>)

Dt: DATE"<week_start_index>:NUMBER (1-7){ 1: Sunday2: Monday … }"Dtt: DATETIME"<week_start_index>:NUMBER (1-7){ 1: Sunday2: Monday … }"

NUMBER

Returns the week count of the associated date/datetime.Date = DATE(2018,1,1)Date.week() -> 1Date.week(2) -> 1

weekday

Dt.weekday()

Dt.weekday(<week_start_index>)

Dtt.weekday()

Dtt.weekday(<week_start_index>)

Dt: DATE"<week_start_index>:NUMBER (1-7){1: Sunday, 2: Monday }"Dtt: DATETIME"<week_start_index>:NUMBER (1-7){1: Sunday, 2: Monday }"

NUMBER

Returns the weekday count of the associated date/datetime.Date = DATE(2018,1,1)Date.week() -> 2Date.week(2) -> 1

month

Dt.month()Dtt.month()

Dt: DATEDtt: DATETIME

NUMBER

Returns the month of the date.Date = DATE(2018,1,1)Date.month() -> 1

year

Dt.year()Dtt.year()

Dt: DATEDtt: DATETIME

NUMBER

Returns the year of the date.Date = DATE(2018,1,1)Date.year() -> 2018

day

Dt.day()Dtt.day()

Dt: DATEDtt: DATETIME

NUMBER

Returns the day component of the date.Date = DATE(2018,1,1)Date.day() -> 1

hour

Dtt.hour()

Dtt: DATETIME

NUMBER

Returns the hour component of the datetime field which is between 0 and 23.Dt = DATETIME(2008,1,1,12,20,00,"Asia/Kolkatta")Dt.hour() -> 12

minute

Dtt.minute()

Dtt: DATETIME

NUMBER

Returns the minute component of the datetime field.Dt = DATETIME(2008,1,1,12,20,00,"Asia/Kolkatta")Dt.minute() ->20

second

Dtt.second()

Dtt: DATETIME

NUMBER

Returns the second component of the datetime field.Dt = DATETIME(2008,1,1,12,20,10,"Asia/Kolkatta")Dt.second() -> 10

has

LstTxt.has(<opt 1>,<opt 2>...)

LstUsr.has(<opt 1>,<opt 2>...)

LstNum.has(<opt 1>,<opt 2>...)

Assignee.has(<user 1>,<user 2>...)

LstTxt : LIST{TEXT},<opt n>:TEXT""LstUsr : LIST{USER},<opt n>:USER""LstNum : LIST{NUMBER},<opt n>:NUMBER""Assignee: ASSIGNEE<user n>: User

BOOLEAN

The output will be true if any one of the <opt> values are on the list. Else the output will be false.List_field = [""Bike"",""Boat""]List_field.has(""Car"",""Plane"") -> FalseList_field.has(""Bike"",""Plane"") -> True"Returns true when a user is directly or indirectly through group hierarchy is part of the AssigneeList.Assume Kau is part of PM.AssigneeList = [PM,adhi];usr = kau;AssigneeList.has(usr) -> TrueUsr = adhi;AssigneeList.has(adhi) -> True

hasAll

LstTxt.hasAll(<opt 1>,<opt 2>...)

LstUsr.hasAll(<opt 1>,<opt 2>...)

LstNum.hasAll(<opt 1>,<opt 2>...)

Assignee.hasAll(<user 1>,<user 2>...)

LstTxt : LIST{TEXT},<opt n>:TEXT"LstUsr : LIST{USER},<opt n>:USER"LstNum : LIST{NUMBER},<opt n>:NUMBER"Assignee: ASSIGNEE<user n>: User"

BOOLEAN

The output will be true if all the <opt> values are on the list. Else the output will be false.List_field = [""Bike"",""Boat"", ""Car""]List_field.hasAll(""Car"",""Bike"") -> TrueList_field.hasAll(""Bike"",""Car"",""Boat"") -> TrueList_field.hasAll(""Bike"",""Car"",""Boat"",""Scooter"") -> FalseThe output will be true if all the <user> values are on the list directly or through groups. Else the output will be false.List_field = [PM,ADHI, Vivek]List_field.hasAll(Kau,vivek) -> TrueList_field.hasAll(suresh,kau) -> False

length

LstTxt.length()

LstUsr.length()

LstNum.length()

LstTxt : LIST{TEXT}LstUsr : LIST{USER}LstNum : LIST{NUMBER}

NUMBER

The output will be the length of the list.List_field = [""Bike"",""Boat""]List_field.length() -> 2List_field = [""Bike"",null]List_field.length() -> 2

get

LstTxt.get(<index>)

LstUsr.get(<index>)

LstNum.get(<index>)

LstTxt : LIST{TEXT}<index>: NUMBERLstUsr : LIST{USER}<index>: NUMBERLstNum : LIST{NUMBER}<index>: NUMBER

TEXT

USER

NUMBER

The output will be the item in the particular index. (index starts at 1)List_field = [""Bike"",""Boat""]List_field.get(1) = ""Bike""List_field.get(2) = ""Boat""List_field.get(3) = null

insert

LstTxt.insert(<item_1>..<item_n>)

LstUsr.insert(<item_1>..<item_n>)

LstNum.insert(<item_1>..<item_n>)

LstTxt : LIST{TEXT}<item_n>: TEXTLstUsr : LIST{USER}<item_n>: USERLstNum : LIST{NUMBER}<item_n>: NUMBER

LIST{TEXT}

LIST{USER}

LIST{NUMBER}

Creates a new list and appends the values of the params as entries.List = [1,2,3]List.insert(4,5) -> [1,2,3,4]List.insert()

insertList

LstTxt.insertList(Lst_Txt1)

LstUsr.insertList(Lst_Usr1)

LstNum.insertList(Lst_Num1)

LstTxt : LIST{TEXT}Lst_Txt1: LIST{TEXT}LstUsr : LIST{USER}Lst_Usr1: LIST{USER}LstNum : LIST{NUMBER}Lst_Num1: LIST{NUMBER}

LIST{TEXT}

LIST{USER}

LIST{NUMBER}

Creates a new list and appends the values of list as entries.List = [1,2,3]List_1 = [1,2]List.insertList(List_1) -> [1,2,3,1,2]

remove

LstTxt.remove(<opt>)

LstUsr.remove(<opt>)

LstNum.remove(<opt>)

Assignee.remove(user_1)

LstTxt : LIST{TEXT}<opt>:TEXTLstUsr : LIST{USER}<opt>:USERLstNum : LIST{NUMBER}<opt>:NUMBERAssignee: ASSIGNEEUser_1: USER

LIST{TEXT}

LIST{USER}

LIST{NUMBER}

LIST{USER}

Returns a new list without the item.List = [1,2,3]List.remove(1) -> [2,3]List = [1,1,1]List.remove(1) -> nullList = [1,2,3]List.remove(4) -> [1,2,3]"Flattens group hierarchy and users in the asignee list into a single flat userlist and then removes user.AList = [PartnerTeam]AList.remove(Manoj) = [Karthik,Siddharth]

concatenate

LstTxt.concatenate(<joiner>)

LstTxt : LIST{TEXT}<joiner>[Optional] : TEXTThe Default Joiner is ","

TEXT

This Method will be permitted only for Lists which have Text Fields. The Method returns the Concatenated version of all the values in the list. Null values are treated as Empty Strings.List = ["Kausik", "Ram"]List.concatenate()-> "Kausik,Ram"List = ["Kausik", null, "Ram"]List.concatenate()-> "Kausik,,Ram"List = ["Kausik", null, "Ram"]List.concatenate("ab")-> "KausikababRam"

sum

LstNum.sum()

LstNum : LIST{NUMBER}

NUMBER

Returns the sum of all the numbers in the array. Will throw an Error if atleast one of the Content in the Array is not a Number.List = [1,2,3]List.sum() -> 6List = [1,null,3]List.sum() -> 4

average

LstNum.average()

LstNum : LIST{NUMBER}

NUMBER

Returns the average of all the numbers in the array. Will throw an Error if atleast one of the Content in the Array is not a Number.List = [1,2,3]List.average() -> 2List = [1,null,3]List.average() -> 4/3

extractNumber

Remotelookup_Fieldname.extractNumber(<path>, <index>)

Remotelookup_Fieldname.extractNumber(<path>, <index>)

Remotelookup_Fieldname: JSON OBJECT

<path>: TEXT (valid json path)

<index>: NUMBER

LIST{NUMBER}

NUMBER

Extracts and returns a number array  from the JSON object as filtered by the provided  json path. If the index is provided then the number in the particular index is extracted.

extractText

Remotelookup_Fieldname.extractNumber(<path>, <index>)

Remotelookup_Fieldname.extractNumber(<path>, <index>)

Remotelookup_Fieldname: JSON OBJECT

<path>: TEXT (valid json path)

<index>: NUMBER

LIST{TEXT}

TEXT

Extracts and returns a text array  from the JSON object as filtered by the provided  json path. If the index is provided then the text in the particular index is extracted.

extractJSON

Remotelookup_Fieldname.extractNumber(<path>, <index>)

Remotelookup_Fieldname.extractNumber(<path>, <index>)

Remotelookup_Fieldname: JSON OBJECT

<path>: TEXT (valid json path)

<index>: NUMBER

LIST{JSONOBJECT}

JSONOBJECT

Extracts and returns a sub-json array  from the JSON object as filtered by the provided  json path. If the index is provided then the sub-json in the particular index position is returned.

Here are more articles about expressions:


How did we do?