Use Google to find help fast. For example, search on "xpressdox choosefromlist".

The EndsWith Function

The EndsWith Function

EndsWith tests the end of a string:

<<If(EndsWith(Surname,'-Smith')>>
<<Surname>>
is a double-barrelled name.
<<SetV('FirstPart',substring(Surname,1,string-length(Surname) - 6))>><<Comment(SetV(‘FirstPart’,string-before(‘-Smith’)) is equivalent)>>
<<End()>>

<<Name_of_Client>><<If(not(EndsWith(ToLower(Name_of_Client),'s')))>>'s<<Else()>>'<<End()>>

Leave a Reply