I have the below string stored in a variable:
11608,613,12,12643,12644,12656
I want to extract each value before the comma and perform a set of actions.
How to extract each value from the string using SPD 2013 workflow?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityThis requires a couple of string actions.
See below working sample. You need to replace ";" with "," in your case
Plumsail Actions Pack contains free strings actions, so you can use Split String action to do this, see an example below:
PS: I want to notice that this is paid product and I'm one of the developers, but you can use String Processing set for free.
I stored 11608,613,12,12643,12644,12656 in a workflow string variable and updated it to a hidden text column in the list.
Then using 2 SharePoint calculated columns, i took each value before the first comma.Then using workflow loop, I updated Calc Column 2 value into the hidden text column till the calc column 2 became empty.
Calc Column 1 formula -
=IF(ISERROR(LEFT([HiddenTextColumn],INT(FIND(",",[HiddenTextColumn])-1))),[HiddenTextColumn],LEFT([HiddenTextColumn],INT(FIND(",",[HiddenTextColumn])-1)))
Calc column 2 formula -
=IF(ISERROR(RIGHT([HiddenTextColumn],LEN([HiddenTextColumn])-INT(FIND(",",[HiddenTextColumn])))),"HiddenTextColumn",RIGHT([HiddenTextColumn],LEN([HiddenTextColumn])-INT(FIND(",",[HiddenTextColumn]))))