cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Criptop
Advocate II
Advocate II

Error Value Returned when trying to update Sharepoint list item in Choice column

Hi All,

 

Had a good look in this forum and have found similar problems but wasn't able to tailor the solution to my situation.

 

I have a sharepoint list with many columns. Three of these are choice columns, two of which allow multiple selections and one does not. An end user will create a new record/item in the sharepoint list using a form in a PowerApp. After the form submission and following an Approval action, a field in the record is updated to "Approve" or "Reject" with all other fields in the record staying the same. Because most fields are required, I use dynamic content in each field to populate the original value from the item created in the sharepoint list. This works great apart from the three choice columns where the choice values are recorded in a code format (screenshot below - the first row is what it should look like (when item is created) , the second row is what the values look like after the Update Sharepoint List Item action is passed. In the scond row, "MSDS" is one of the choices that has been recorded.)

 

Criptop_1-1662369813818.png

The flow:

 

FlowScreenshot1.png

 

Where it goes wrong. I've tried inputting the dynamic choice fields as arrays, but it still doesn't work 😞

FlowScreenshot2.png

  

Thanks for your help in advance! 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Criptop ,

 

Please delete the string and keep the output dyanmaic content.

vxiaochenmsft_0-1662544516814.png

Best Regards,

Wearsky

View solution in original post

8 REPLIES 8
v-xiaochen-msft
Community Support
Community Support

Hi @Criptop ,

 

Please make sure it's formatted as follows-

vxiaochenmsft_0-1662445901821.png

It's an array and the attribute name of the single object is 'Value'.

 

Best Regards,

Wearsky

Hi @v-xiaochen-msft ,

 

Thank you for your response. Please see below screenshot which shows two of the multiple choice fields:

 

Criptop_1-1662470158889.png

 

1. I think it is in the correct format, can you confirm?

2. Can I use dynamic values here as I have done?

3. When I add the "Documents_Required_From_Supplier2" field as a dynamic value, I am given the option to select the field, the field 'Value' or field 'Item'. I currently have the regular field selected. I tried it with Item and Value, which causes Automate to move the action into a nested Apply to Each action, but when I test the flow I still get the same error value in the Sharepoint List.

4. In your screenshot, you have two possible choices. Do I need to format the array as I have done in my screenshot, or do I need to supply a "Value" for each choice. For example, in the "Documents_..." choice field, there are 13 possible choices - do I need to format the array as :

 

[

 {

  "Value": *Choice 1/Dynamic Content*

 },

 {

  "Value": *Choice 2/Dynamic Content*

 }

 

etc up to Choice 13?

 

Regards,

Criptop

v-xiaochen-msft
Community Support
Community Support

Hi @Criptop ,

 

The key is to format the choices array.

vxiaochenmsft_0-1662515596193.png

vxiaochenmsft_1-1662515650236.png

vxiaochenmsft_2-1662515706771.png

vxiaochenmsft_3-1662515732160.png

vxiaochenmsft_4-1662515786966.png

 

Best Regards,

Wearsky

Criptop
Advocate II
Advocate II

Hi @v-xiaochen-msft 

 

Thank you for those screenshots. I have replicated them in my flow, which formats the choices correctly and passes them to the choices field in the Update item action:

 

Criptop_0-1662542894203.png

Criptop_1-1662542898884.png

Criptop_2-1662542929179.png

Criptop_3-1662542937185.png

Criptop_4-1662542960518.png

Criptop_5-1662542984878.png

However, the choices are still not recorded correctly in the Sharepoint List:

 

Criptop_6-1662543014670.png

 

Can you please advise what I should do?

v-xiaochen-msft
Community Support
Community Support

Hi @Criptop ,

 

Click on this button and use same output here.

vxiaochenmsft_0-1662543439021.png

 

 

Best Regards,

Wearsky

Criptop
Advocate II
Advocate II

Hi @v-xiaochen-msft ,

 

Thank you for your prompt reply. Sorry, but I don't think I understand what you are saying.

 

When I click on that button, it shows this:

 

Criptop_0-1662543752988.png

 

It looks like the same format as the Output from the Select action. 

 

Please see below screenshot from the Update item action in a flow test. Is the extra "[" the problem?

 

Criptop_1-1662544073314.png

 

Should I change this:

 

Criptop_0-1662543752988.png

 

To this?:

 

Criptop_2-1662544367152.png

 

Regards,

Criptop

v-xiaochen-msft
Community Support
Community Support

Hi @Criptop ,

 

Please delete the string and keep the output dyanmaic content.

vxiaochenmsft_0-1662544516814.png

Best Regards,

Wearsky

Criptop
Advocate II
Advocate II

Hi @v-xiaochen-msft ,

 

You, sir, are a legend. Everything is now working as expected. Thank you so much for your help!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,763)