cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoseZald101
Level: Powered On

How to convert an input string to list item choices in Sharepoint?

Hi Everyone,

I have a weird use case for converting a string into the their correspoding choices in a sharepoint list.

 

The input string would someting like this:

A;#B;#;D#;G#

 

The multivalue choice items the Sharepoint item are

A, B, C, D, E, F, G

 

When MS Flow runs, I only want these choice items selected.

A, B, D, G

 

Would just replacing ";#" to "," do it?

 

Thanks in advance.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
JoseZald101
Level: Powered On

Re: How to convert an input string to list item choices in Sharepoint?

Hi All,

What a great community of developers! I posted the question last night and got the answer this morning!

Thank you Pieter Veenstra for the great explanation and example. Looping through the array and adding to the variable was the key.

https://veenstra.me.uk/2019/04/01/microsoft-flow-update-a-multi-select-choice-field-in-a-sharepoint-...

View solution in original post

2 REPLIES 2
JoseZald101
Level: Powered On

Re: How to convert an input string to list item choices in Sharepoint?

I tried multiple scenarios.
1) Split the entry into array
[
"A",
"B",
"D",
"G"
]

2) but to assign the array into the muti-value field. the array must read like this:
[
{
"Value": "A"
},
{
"Value": "B"
},
{
"Value": "D"
},
{
"Value": "G"
}
]

Highlighted
JoseZald101
Level: Powered On

Re: How to convert an input string to list item choices in Sharepoint?

Hi All,

What a great community of developers! I posted the question last night and got the answer this morning!

Thank you Pieter Veenstra for the great explanation and example. Looping through the array and adding to the variable was the key.

https://veenstra.me.uk/2019/04/01/microsoft-flow-update-a-multi-select-choice-field-in-a-sharepoint-...

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,873)