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 Apps / Patch combobox to mult...
Power Apps
Answered

Patch combobox to multiple choice column in sharepoint list

(0) ShareShare
ReportReport
Posted on by

Hello together,

 

I want to create new entries in my sharepoint list (List1) by using a powerapps page. For one column I have a ComboBox in powerapps because I need the possibility to patch one or more choices. In my sharepoint list multiple selection is allowed.

My code:

Patch(

     List1;

     Defaults(

          List1

     );

     {Column1: ComboBox1.SelectedItems}

)

I get the error message "missing colums. In your formula is missing a column "value" from type "text" and "invalid argument type. a table value is expected but with a different schema".

In my formula I have some more columns to patch, but just with textinput. These are working fine if I try without the combobox column.

 

Can anybody help me here?

Thanks in advance

Lukas

 

 

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

    Hi @luwu_7100 ,

     

    The multi-select column of SP list needs the table with the column name "Value", and your Items gets the table with the column name "Teilkreis", so we only need to change the column name to "Value".

     

    Rimmon

  • luwu_7100 Profile Picture
    on at

    Hi @v-mengmli-msft ,

     

    thank you very much, now it works perfectly.

    Can you please explain why this step is necessery here? I would like to understand what causes the problem and why it can be solved this way.

     

    Best regards,

    Lukas

  • Verified answer
    v-mengmli-msft Profile Picture
    on at

    Hi @luwu_7100 ,

     

    Please try this:

    1.Modify the code on the Items:

    RenameColumns(Teilkreis[@Teilkreis],"Teilkreis","Value")

    2.Then use the above patch formula:

    Patch(List,Defaults(List),{ReqiuredColumnName:"test",ChoiceColumnName:ComboBox.SelectedItems})

     

     

    Best regards,

    Rimmon

  • luwu_7100 Profile Picture
    on at

    Hi @v-mengmli-msft ,

     

    items are defined by an excel list that is connected to my powerapp, where all possible expressions are listed.

    So items of my combobox is "Teilkreis[@Teilkreis]" ("Teilkreis" is the name of the table and of the column in excel).

    To make sure that this is no problem I enabled the option where I can allow to manually add new values in my sharepoint list.

     

    Thank you

    Lukas

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @luwu_7100,

    Please make sure when you patch your data to the SharePoint list, you include any columns that are set to required. 

     

    Here is an example of patching different column types to SharePoint.

     

    Patch(
     'Test List',
     Defaults('Test List'),
     {
     testText: TextInput1.Text, // Text column
     testNumber: Value(TextInput1_1.Text), // Number column
     testChoice: ComboBox1.Selected, // Single value choice column
     testMultipleChoice: ComboBox1_1.SelectedItems // Multiple value choice coulmn
     }
    )

     

     

    Please note: You will need to change the code to suit your language locale. 

     

     

    Also 'Allow multiple selections' should be set to yes in the SharePoint column.

    AARON_C_0-1698127344517.png

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

     

  • v-mengmli-msft Profile Picture
    on at

    Hi @luwu_7100 ,

     

    Could you please show me the Items of combo box?

    If the items of comb box is "Choices([@List].ChoiceColumnName)", please try this:

    Patch(List,Defaults(List),{ReqiuredColumnName:"test",ChoiceColumnName:ComboBox.SelectedItems})

    vmengmlimsft_0-1698126259595.png

     

     

    Best regards,

    Rimmon

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 Apps

#1
Kalathiya Profile Picture

Kalathiya 403

#2
WarrenBelz Profile Picture

WarrenBelz 338 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 320 Super User 2025 Season 2

Last 30 days Overall leaderboard