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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching multiselect v...
Power Apps
Suggested Answer

Patching multiselect values from dropdown to sharepoint list using submit button

(0) ShareShare
ReportReport
Posted on by 237
Hello,
 
I have a drop down that allows to select multiple responsibilities. The responsibility auto-populates based on the selected responsibilities. I have a submit button that submits the form but I noticed the responsibilities were not getting saved to the SharePoint list. This is the code I have. Is it correct?
 
SubmitForm(Form1);
If(
    newMode = true,
    Patch(
        'Financial Systems Requests',
        Defaults('Financial Systems Requests'),// Use Defaults for creating a new item, or use LookUp if updating an existing item
        {
            Title: DataCardValue1.Text,
            Responsibility: DataCardValue14.SelectedItems,
            Owner: DataCardValue6.Text
        }
    ),
    Patch(
        'Financial Systems Requests',
        LookUp(
            'Financial Systems Requests',
            ID = CurrentItem.ID
        ),
        {
            Responsibility: DataCardValue14.SelectedItems,
            Owner: DataCardValue6.Text
        }
    );
   
)
Categories:
I have the same question (0)
  • Suggested answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    Hey
     
    Can u try this Code:
     
    SubmitForm(Form1);
    If(
        newMode = true,
        Patch(
            'Financial Systems Requests',
            Defaults('Financial Systems Requests'),
            {
                Title: DataCardValue1.Text,
                Responsibility: DataCardValue14.SelectedItems,
                Owner: DataCardValue6.Text
            }
        ),
        Patch(
            'Financial Systems Requests',
            LookUp(
                'Financial Systems Requests',
                ID = CurrentItem.ID
            ),
            {
                Responsibility: ForAll(DataCardValue14.SelectedItems, {Value: ThisRecord.Value}),
                Owner: DataCardValue6.Text
            }
        )
    );
     
     
    If IT worked please mark as verified answers
     
     
    Cheers
  • WarrenBelz Profile Picture
    156,458 Most Valuable Professional on at
    What is the Items, DefaultSelectedItems and DisplayFields of DataCardValue14 and can I assume that Responsibility is a multi-value Choice field ? 
  • NP-18101421-0 Profile Picture
    237 on at
     
    Items: 
    Choices([@'Financial Systems Requests'].Responsibility)
     
    DefaultSelectedItems: 
    LookUp('Financial Systems Requests', ID = CurrentItem.ID,Responsibility)
     
    DisplayFields: 
    ["Value"]
     
     
    Responsibility is a multiselect value choice field:
  • WarrenBelz Profile Picture
    156,458 Most Valuable Professional on at
    Apart from the DefaultSelectedItems being able to be much simpler with (yours should work however)
    ThisItem.Responsibility
    If you are (as I am suspecting) wanting all of that to be written on the same record as your Form is submitting, you can use this for both new and edit modes - Firstly submit the form
    SubmitForm(Form1);
    then OnSuccess of the Form - I am assuming that none of those controls are on the Form.
    Patch(
       'Financial Systems Requests',
       {
          ID: Self.LastSubmit.ID,
          Title: DataCardValue1.Text,
          Responsibility: DataCardValue14.SelectedItems,
          Owner: DataCardValue6.Text
       }
    )
    Are my assumptions correct ?
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

     
  • NP-18101421-0 Profile Picture
    237 on at
     
    The form has 2 fields where the values for both should save to SharePoint list upon hitting the submit button.
     
    Both fields are on the form.
    1) Responsibility - a dropdown field that is multiselect
    2) Responsibility Owner - a text field that captures the owners for each responsibility 
     
    When I hit the submit button, I get an error "Cannot Save. Please check if there are errors in the form". 
  • WarrenBelz Profile Picture
    156,458 Most Valuable Professional on at
    What is the Update properties of both Data Cards and the Items, DefaultSelectedItems and DisplayFields of the dropdown ?
  • NP-18101421-0 Profile Picture
    237 on at
     
    Dropdown:
    Update: DataCardValue14.Selected
    Items: Choices([@'Financial Systems Requests'].Responsibility)
    DefaultSelectedItems: I updated it to ThisItem.Responsibility, before it was: LookUp('Financial Systems Requests', ID = CurrentItem.ID,Responsibility)
    DisplayFields: ["Value"]
     
     
    Text Field
    Update: DataCardValue6.Text
     
     
  • WarrenBelz Profile Picture
    156,458 Most Valuable Professional on at
    Assuming you are submitting the Form, it should update fine with those settings. Why are you using a Patch ?
  • NP-18101421-0 Profile Picture
    237 on at
    Even after removing the patch, it doesn't submit successfully. I deleted the submit button and added it again, yet still no luck. 
     
  • WarrenBelz Profile Picture
    156,458 Most Valuable Professional on at
    That error suggests you have a field where the type of data you are sending to it from Power Apps does not match the field type you are sending it to. The main suspect would be a complex field type such as a Choice or Lookup field. Is Responsibility the only field in the Form and is your Combo Box multi-select ?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard