@Begins (Formula Language)
Determines whether a particular substring is stored at the beginning of another string.
Syntax
@Begins( string ; substring )
Parameters
string
Text or text string. Any string.
substring
Text or text string. The string you want to search for at the beginning of string.
Return value
flag
Boolean.
- Returns 1 (True) if substring is contained within string, beginning from the first letter
- Returns 0 (False) if not
Usage
This function is case-sensitive.
If the either parameter is a list, the function tests each element of the second parameter against each element of the first parameter and returns 1 if any match occurs.
Examples
- This example returns 1.
@Begins("Hi There";"Hi")
- This example returns 0.
@Begins("Hi There";"hi")
- This example checks the field named Topic; if that field begins
with the string "All desks memo", returns the string: Junk Mail. Otherwise,
it returns the string: Read this first.
@If(@Begins(Topic;"All desks memo");"Junk Mail"; "Read this first")
- This formula checks to see if the beginning of the Signature field
contains the strings "Luigi" or "Florence" or "Henri." If it does,
the string Verify Signature is returned; otherwise, the string Don't
Verify Signature is returned.
@If(@Begins(Signature; "Luigi":"Florence":"Henri"); "Verify signature"; "Don't Verify Signature")