Community Commons Module’s StringSplit Java Action might help you.
Create a microflow like this:
Here is the string variable
here is the StrSplit Java action
This will return a list of objects you can loop through to accomplish what you want.
Hope that helps,
I actually did what you suggested, but am just having issues looping through the split strings and getting the specific index and its corresponding value. In my example, if the strings are split, then I should have the loop go through 4 times and each index should have one split string. However, after the first iteration, it shows me index as 0, value as "bob$testdata$Result123$001". My expectation was, the value would contain “bob” and that was not what I noticed.
My interest is only to capture testdata, Result123 and 001 values and set them into one of the entity specific attributes.
Any help on the looping part will be appreciated.
I was finally able to get the Split string function working to my need. Just an FYI that since I had ‘$’ as delimiter in my string, this java action expects an escape character before that. Had it been a comma or any other delimiter this java action works pretty well. Anyways, my problem is resolved now.
Thanks a lot to Mike and Bhanu.