cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
henrylamborn1
Frequent Visitor

Simple Question (I hope!) Sharepoint ID on Choice Column

Hi,

I've got what I hope is a simple question. I'm currently building a flow that uses dynamic values for a 'List Name' and  ' ID' on the SharePoint Update Item Action (its triggered off a button). As part of this, I understand I need to fill in the 'Item' parameter with a JSON payload to update the record.

 

In my particular example, I'm updating a choice column, this I can all do fine, but I'm wondering if there is any quick way to see the 'ID' given to any given choice in SharePoint ( so I can include it in my JSON), as I'm not sure where to retrieve this on the SharePoint UI! 

henrylamborn1_0-1654706345824.png

henrylamborn1_1-1654706466402.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
David-
Solution Sage
Solution Sage

You are in luck, I spent hours figuring this out just the other day. To populate the choices back to your list for an update item action, you need to use the following actions:

David_2-1654708559713.png

 

In the Apply to Each action, choose the field with the choice data (do not use the one with 'Values'). Then in the append to array variable action, use the expression builder and enter items('Apply_to_each_Bond_Choice')?['Value'] (I know it looks like I inserted dynamic content in the image, but it is not. And of course 'Apply_to_each_Bond_Choice' will be whatever you name the Apply to each action).

 

In the Select action, use the expression builder again and variables('Choices') in From -- or whatever you name the variable you initialize -- and item() in the Map after the key Value.

 

In your Update item action, click on the icon to the right of the field to Switch to Input Entire Array and then choose the dynamic content with the output of your select action:

David_1-1654708404053.png

 

View solution in original post

3 REPLIES 3
David-
Solution Sage
Solution Sage

You are in luck, I spent hours figuring this out just the other day. To populate the choices back to your list for an update item action, you need to use the following actions:

David_2-1654708559713.png

 

In the Apply to Each action, choose the field with the choice data (do not use the one with 'Values'). Then in the append to array variable action, use the expression builder and enter items('Apply_to_each_Bond_Choice')?['Value'] (I know it looks like I inserted dynamic content in the image, but it is not. And of course 'Apply_to_each_Bond_Choice' will be whatever you name the Apply to each action).

 

In the Select action, use the expression builder again and variables('Choices') in From -- or whatever you name the variable you initialize -- and item() in the Map after the key Value.

 

In your Update item action, click on the icon to the right of the field to Switch to Input Entire Array and then choose the dynamic content with the output of your select action:

David_1-1654708404053.png

 

David-
Solution Sage
Solution Sage

P.S. I thought this should be simple, too! 😁

henrylamborn1
Frequent Visitor

Thanks, looks like you saved me a lot of time!

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,584)