Data in the resulting script looks like this
I Created a calculation within the script to count the instances of “D|“. I assigned the resulting value to a variable. When there are more than one instances of the indicated string it gives the correct count. If there are no instances of the indicated string it gives the correct count of zero. If there is only one instance of the indicated string the result is nothing.
I have tried IF statements to check for a count of one and nothing so far has worked.