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.