NextGen Knowledge Center

REVFIND String Function

Use:Finds the first occurrence of a specified character in a string, starting from the end (right side) of the string
Syntax:
{REVFIND( «string» , «char» )}
Arguments:

«string»
    Character string to be searched
«char»
    Value to be found (case sensitive)
Returns:If the character is found, its zero-based position in the string, starting from the beginning (left side) of the string

-Or-

-1 if the character is not found

Example 1:

Field = txt_field
{template_name_.txt_field} = NextGen Healthcare
{REVFIND( {template_name_.txt_field}, "a"}

Result: 15

Example 2:

Field = txt_field
{template_name_.txt_field} = NextGen Healthcare
{REVFIND( {template_name_.txt_field}, "i")}

Result: -1