Has anybody found a solution to this “easy” requirement yet?
I cannot find a way to find a substring defined in a variable within a given input.
i.e:
$searchstring - variable of type varchar where substring is located
$input - Input string which should be checked wheter it contains the variable $searchstring.
I imagine theres half a dozen different ways to do this, including using regular expressions. I typically use the index() function. It returns the starting position of the substring field if present. (check if index > 0)
of note… if you’re trying to raise an exception, DS doesnt seem to like having the raise_exception inside of an ifthenelse statement. I believe the optimizer must garbage collect the field and you get nothing on output. So my suggestion is to wrap a custom function around it.