Hello, I have the following example:
ownerString is a text string: email1@gmail.com; email2@gmail.com
value: a!forEach( items: split(fv!row.ownerString, ";"), expression: stripwith(fv!item, ";") )
the result of this code is:
email1@gmail.com;
email2@gmail.com
Where the expected result have to be
email1@gmail.com
in order to be used inside user() function.
The difference is the ; which is not being removed.
Any suggestions are welcome
Thank you.
Discussion posts and replies are publicly visible
Can you post a screenshot of the output you're getting? Without seeing this, I can guess that what you're actually seeing is the array output, which Appian automatically formats using a ";" in between each returned member, for the purposes of visibility (depending on which formatting you choose to have it show you). This wouldn't be included in your "stripwith" since it's not actually data contained in the returned elements.
Secondarily, if you're calling "split()" on the ";" character, there should be no need to pass it through "stripwith" also. You probably need to pass each output through "trim" to deal with unnecessary spaces, though.
you are correct, the problem was the trim()
thank you as always!