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 a multiselect...
Power Apps
Answered

Patching a multiselect combobox-PLEASE HELP

(0) ShareShare
ReportReport
Posted on by 116

I just can't figure this out!!! please help me before i go crazy

 

I have a multiselect combox that has items from a lookup field:  Choices('Department List'.Systems_Lookup)

 

I need to be able to take what they choose from this lookup list and PATCH it back into a sharepoint list/log.

-Does the column need to be a lookup or choice column that it is patching back to:??

 

I originally concat all the items and put it as a text BUT in the editform part, they want to be able to edit those choices they make and using a text doesnt work for that.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Km00 

    I need a little clarification - you state Patching back the values, but then you mention you have edit form, so why are you using Patch and not SubmitForm?

     

    Next, what kind of column is it that you are trying to write to?  Text, Choice or Lookup or other?

    What you are trying to do can be done with any of them, just need to know which one.

     

  • Km00 Profile Picture
    116 on at

    *I have 2 different sharepoint lists i need to patch to, customer request.  i dont recall why we don't use submit form.  We are using the Update and then also patching on specific cards because again, the person who started this did it this way and i'm just supposed to build off of it.  It worked great, until they wanted to change options within the EditForm. 

     

    I'm trying to write back to a Lookup field.

     

     

     

    Patch(
    'TESTAction Log',
    Defaults('TESTAction Log'),
    Form_Upload_1.Updates,
    UploadForm_Doc_Details_1.Updates,
    Usage_Form_1.Updates,
    {SO_Dept:
    {
    Id: SODeptCombo_2.Selected.ID,
    Value: SODeptCombo_2.Selected.Title,
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}
    },
    {SO_Dept_DisplayName:hiddenLabel_SODept_2.Text},
    {Doc_Owner_DisplayName: Document_Owner_Value_1.Text},
    {DO_Designee_DisplayName: hiddenLabel_DO_Designee_2.Text},
    {Dept_Usage:hiddenLabel_allDepts_1.Text},
    {System_Usage:hiddenLabel_system_1.Text},
    {Role_Usage: hiddenLabel_Roles_2.Text},
    {Process_Usage:hiddenLabel_process_1.Text},
    {ParentID:lblID_1.Text},
    {Title: Working_Doc_Location_Value_1.Text},
    {Apply_to_every_page: vareveryPage},
    {Doc_Owner:
    {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Claims: DocOwnerPeopleField_1.Selected.Claims,
    Department: DocOwnerPeopleField_1.Selected.Department,
    DisplayName: DocOwnerPeopleField_1.Selected.DisplayName,
    Email: "",
    JobTitle: "",
    Picture: ""
    }
    },
    {DO_Designee:
    {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Claims: DO_Designee_ComboBox1_1.Selected.Mail,
    Department: DO_Designee_ComboBox1_1.Selected.Department,
    DisplayName: DO_Designee_ComboBox1_1.Selected.DisplayName,
    Email: DO_Designee_ComboBox1_1.Selected.Mail,
    JobTitle: "",
    Picture: ""

    }});


    Patch(
    'TESTNew Item Only Action Log',
    Defaults('TESTNew Item Only Action Log'),
    Form_Upload_1.Updates,
    UploadForm_Doc_Details_1.Updates,
    Usage_Form_1.Updates,
    {SO_Dept:
    {
    Id: SODeptCombo_2.Selected.ID,
    Value: SODeptCombo_2.Selected.Title,
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}
    },
    {SO_Dept_DisplayName:hiddenLabel_SODept_2.Text},
    {Doc_Owner_DisplayName: Document_Owner_Value_1.Text},
    {DO_Designee_DisplayName: hiddenLabel_DO_Designee_2.Text},
    {Dept_Usage:hiddenLabel_allDepts_1.Text},
    {System_Usage:hiddenLabel_system_1.Text},
    {Role_Usage: hiddenLabel_Roles_2.Text},
    {Process_Usage:hiddenLabel_process_1.Text},
    {ParentID:lblID_1.Text},
    {Title: Working_Doc_Location_Value_1.Text},
    {Apply_to_every_page: vareveryPage},
    {Doc_Owner:
    {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Claims: DocOwnerPeopleField_1.Selected.Claims,
    Department: DocOwnerPeopleField_1.Selected.Department,
    DisplayName: DocOwnerPeopleField_1.Selected.DisplayName,
    Email: "",
    JobTitle: "",
    Picture: ""
    }
    },
    {DO_Designee:
    {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Claims: DO_Designee_ComboBox1_1.Selected.Mail,
    Department: DO_Designee_ComboBox1_1.Selected.Department,
    DisplayName: DO_Designee_ComboBox1_1.Selected.DisplayName,
    Email: DO_Designee_ComboBox1_1.Selected.Mail,
    JobTitle: "",
    Picture: ""
    }}
    );

    ResetForm(Form_Upload_1);
    ResetForm(UploadForm_Doc_Details_1);
    ResetForm(Usage_Form_1);
    Set(ResetCheckbox,true);
    Navigate(Doc_Mgmt_Form, Transition.None)

  • Km00 Profile Picture
    116 on at

    Now i remember 🙂  

     

    There are actually 3 different forms within this one Patch.  Looks like the screenshot. 

    Km00_0-1613499014216.png

     

  • Km00 Profile Picture
    116 on at

    Should i try to make it into one form and just do a submit form? I'll do it if it will make all my problems go away 🙂

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Km00 

    YES....your problems would go away!
    The only slight challenge would be to create an additional record in the TESTNew Item Only Action Log datasource.  But it appears they are the same schema, so you can simply put a formula like this in your OnSuccess action of the form:

    Patch('TESTNew Item Only Action Log', Defaults('TESTNew Item Only Action Log'), 
     Patch(YourForm.LastSubmit, {ID:Blank()})
    )

     

    Since your 3 forms are all on the same screen, one form would be very easy to achieve.  Currently you are losing ALL of the capabilities of your forms which are valuable to have.  

    If I am missing something in your picture and you are actually splitting the forms across multiple screens or tabs, then I would advise reviewing my video on splitting edit forms properly without losing the capabilities.

     

    Once you have it as one form, then we can resolve the combobox issues.  In general, the EditForm will automatically resolve them all for you when you add the field in.  Sometimes lookups need a little more capability than out of the box, but it is easy to add in.

     

  • Km00 Profile Picture
    116 on at

    I replied with a issue but it was actually my own oopsie lol.

     

    So far so good.  I'll update shortly with the final a-okay.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Km00 

    So the thing is...your form is all on one screen!!  There is no need to split the form as you are.  You can just have one form on the screen and use that.

    Splitting the form is a bit of a complication and something you only need when you need to split across multiple screens or controls.  In your case you don't need to do that and it is a complication you really don't need.

     

    I would just create the form as one form on the screen and use it.

     

    Is there ANY particular reason to split the form on one screen in your scenario??

  • Km00 Profile Picture
    116 on at

    The Business partner liked the look of it i guess.  i came in the middle of it and had to take the development over.

     

    I ended up following your video before i saw this and its working great.  The only thing is the attachment isnt uploading. Everything else is now updating.

  • Km00 Profile Picture
    116 on at

    Any idea on how to get the Attachment to upload to the list item as well?  That appears to be the only thing with 'SubmitForm' that isnt working.

  • Iamglt Profile Picture
    316 on at

    Hi Randy thanks to your video - was about to post this exact same issue I'm having.  Fantastic video, and I have a lot of work updating my multi screen app.

    Cheers,

    Geoff.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard