web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Error when trying to c...
Power Automate
Answered

Error when trying to create an item in sharepoint with multi-select choice field

(0) ShareShare
ReportReport
Posted on by 25

I am trying to update a multi-select choice field in a sharepoint list from flow.   I keep getting the error 

OpenApiOperationParameterValidationFailed. The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: The API operation does not contain a definition for parameter 'item/Color'.

If I hardcode those array values in the Create item section it creates without any problems.   It is just when I'm passing in an array to the multi-select choice field.

Below is the column definition in sharepoint and the flow they I created to update this column.

Flow_Error_Sharepoint_def.png

 

Flow_Error_Flow_def.png

 

If I harcode it like the following it works without a problem.

 

flow_error_hardcoded.png

If you look at the inputs for the Create Item step they both show the following:

 

{
 "host": {
 "apiId": "subscriptions/12345678-1234-1234-a1234-1234567890/providers/Microsoft.Web/locations/westus/runtimes/msmanaged-na/apis/sharepointonline",
 "connectionReferenceName": "shared_sharepointonline",
 "operationId": "PostItem"
 },
 "parameters": {
 "dataset": "https://sitename.sharepoint.com/sites/ABC/IT",
 "table": "1234-1234-1324-1234-123456789012",
 "item/Title": "Test2",
 "item/Color": [
 {
 "Value": "Red"
 },
 {
 "Value": "Yellow"
 }
 ]
 }
}

Anyone have any idea on this error, or another way to populate a multi-select choice field?

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    on at

    Hi @Brian2M ,

     

    Please take a try with the following workaround.

     

    Instead of inputting the value into a variable directly, please try with a Compose.

     

    After the Compose action, initialize an Array variable.

     

    Add Apply to each, select from Compose output, add Append to array variable within the loop, and input the following function in the Value field:

    items('Apply_to_each')?['value']

     

    Under Apply to each, add Compose 2 with the following code:

    join(variables('Test'),',')

     

    Add action Create item, in the Multiple selection enabled Choice column, select Compose 2 output as a custom value.

    1.PNG2.PNG

     

    Best regards,

    Mabel          

     

  • Brian2M Profile Picture
    25 on at

    @v-yamao-msft -

     

    Tried your suggestion and the same error still comes up.

     

    It appears in the input to the Create Item step that it is just representing the options as a standard array.  Is this how your input looks?

    {
     "host": {
     "apiId": "subscriptions/12345678-1234-1234-1234-123456789012/providers/Microsoft.Web/locations/westus/runtimes/msmanaged-na/apis/sharepointonline",
     "connectionReferenceName": "shared_sharepointonline",
     "operationId": "PostItem"
     },
     "parameters": {
     "dataset": "https://MySite.sharepoint.com/sites/ABC/IT",
     "table": "123456-1234-1234-1234-123456789012",
     "item/Title": "Test2",
     "item/Color": "Red,Yellow"
     }
    }

    Flow_Top.png

     

    Flow_bottom.png

     

     

  • v-yamao-msft Profile Picture
    on at

    Hi @Brian2M ,

     

    In the action Create item, for the multiple selection enabled column, instead of switching to input entire array, please stay with the detail inputs, and select the compose output as a custom value.

    1.PNG

     

    Best regards,

    Mabel

     

  • Brian2M Profile Picture
    25 on at

    @v-yamao-msft 

     

    That appears to work, but the values do not appear to be selected in sharepoint.

    Below is a manually entered item and the TEST2 entered from the flow suggestion.  On the list they look exactly the same.


    Flow_test2_list.png

     

    If I look at the Manually entered item it shows Red and Yellow selected.flow_test2_manual.png

     

    On the item that was entered using flow the Colors do not appear to be selected.

    Flow_Test2_auto.png

    flow_test2_auto2.png

     

     

  • Verified answer
    Brian2M Profile Picture
    25 on at

    My original logic is now working.   Something must have been adjusted in the backend.   I took one of my original flows that was failing at the beginning of the week and reran without modifying it and it now works correctly.

     

    Thanks @v-yamao-msft for the suggestions, but changes must be rolling out and my tenant must have been having some issues.

     

     

  • v-yamao-msft Profile Picture
    on at

    Hi @Brian2M ,

     

    Thanks for updating and glad to hear that it is working for you now.

     

    Hope my suggestions could be helpful as well.

     

    Best regards,

    Mabel  

     

  • Community Power Platform Member Profile Picture
    on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard