I have a string that could contain any of these values
set @string = "a, b, c"
I thought I could do this using AMPscript
if IndexOf(@string,'a') > 0 or IndexOf(@string,'b') > 0 or IndexOf(@string,'c') > 0 then /* do nothing */ else RaiseError('Unknown value submitted',true) endif
The idea being if my string contains, say,
"a, b, c, x", or anything other than
c there would be an error and skip that record.
But it's not working and I have no idea why. Anyone have ideas?