I’m pretty new to crystal. I have a parameter called {?names} which allows multiple values that will search the database for all those names or something similar. I want to check every value of the array for a “,” just in case somebody writes "last name, first name". If it does contain “,” then I want to split it at the “,” and then make a new array where all the values are their own value in the array. Like this:
{?names} = ["hank", "jerry", "smith, john", "peterson"]
How would I check every value of the array for a “,” and if it is found, split it and separate it into two different values in a new array? Like this:
new {?names} = ["hank", "jerry", "smith", "john", "peterson"]
Sorry if this is a noob question, but I kinda am a noob. Thanks for your help!
Create a formula field:
This approach won’t remove spaces, however. “smith, john” will result in “smith”, ” john”, for example.
It that is important, try this approach: