I am using SharePoint online as a platform where I have a custom form which has multiselect dropdown control. I'm saving the values of the control using ";" in the single line of text field.

Now I want to iterate each of the values which are saved in the field using MS Flow and for example if there are 4 values such as "abc;xyz;hi;hello", I then want these values to be inserted in another list with each value being an item (row) with title column.

Any help on this would be appreciated.

  1. Initialize variable action initialize an array value.In string function, you could find the split function.

enter image description here


2.Apply to each action and use create item action in it. enter image description here


You can follow below approach:

  1. Add Compose action and use split() function to split the string by ; and get array of substrings.
  2. Then use Apply to each action on Output of compose action
  3. Inside Apply to each action create a new item in 2nd list using Create item action.

Working flow in action:

enter image description here

Split function formula:

split(outputs('Get_item')?['body/Title'], ';')

Where outputs('Get_item')?['body/Title'] is a column with multiple values separated by ;

Input to Flow:

enter image description here

Output - items create in SharePoint list:

enter image description here

For more information check below references:

  1. split string and apply for each
  2. Split string into array of characters - empty delimiter not working

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.