How to check if a data item contains any ",",".","-"

Gary96

Member
Hi I need to check if a Data Item contains either "," or "." or "-"

Scenario:
Data Item 1 = John,Mary
Data Item 2 = John
Data Item 3 = John- Mary

My Data Items can be of different length, but I only want to check if they have any of the above characters.
 

Pete_L

Active Member
Look up InStr in the expression builder. It will find the first position of the character string you provide. If the result is >0 it means that the character string is contained in the test string (data item value). If the result is 7, it means that the character string was found in position 7 of the test string.
 
Top