STARTSWITH

Returns true if and only if this string starts with the specified sequence of char values. This function can be used only with SCRIPT function.

Function: STARTSWITH(INPUT_​FLD,SEARCH_​STRING,EXPECTED_​OUTPUT)

Examples:

  • If PERSONIDNUMBER = ‘2020-04-30’

SCRIPT([PERSONIDNUMBER!=''&&STARTSWITH(PERSONIDNUMBER,‘202004’,TRUE)],{PERSONIDNUMBER;’’})

Here, SCRIPT function returns ‘’ i.e. EMPTY_​STRING

  • If PERSONIDNUMBER = ‘20200430’

SCRIPT([PERSONIDNUMBER!=''&&STARTSWITH(PERSONIDNUMBER‘202004’,TRUE)],{PERSONIDNUMBER;’’})

Here, SCRIPT function returns PERSONIDNUMBER

Parameters:

INPUT_​FLD the input field value to be checked for

SEARCH_​STRING the sequence to search for

EXPECTED_​OUTPUT the expected result. This can be TRUE or FALSE.

Returns:

TRUE if this returns the EXPECTED_​OUTPUT, FALSE otherwise.