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 Apps
Unanswered

Patch Collection

(0) ShareShare
ReportReport
Posted on by 92

Hi,

 

I have this syntax where I created UpdateContext from a SharePoint list called MasterList to use it in my combobox in another list called DetailList. I created also a collection hoping that I can patch it.

 

LookUp('Master List', ID = DataCardValue70.Selected.Value);
UpdateContext(
 {
 PrimaryInspectionName: LookUp('Master List', ID = DataCardValue70.Selected.Value).'Primary Inspection Name',
 SecondaryInspectionName: LookUp('Master List', ID = DataCardValue70.Selected.Value). 'Secondary Inspection Name'
 }
);
ClearCollect(collectInspector,[PrimaryInspectionName,SecondaryInspectionName])

 

But this is creating an error.

 Inspector:ForAll (DataCardValue40.SelectedItems, 
 {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", 
 Value:collectInspector.Value 
 }
 ),

 

Can someone help me how to do the Patch? Thank you 🙂

 

 

Regards,

May

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

    @mayarnaldo 

    It is hard to tell the complete context of what you are doing and how. But, after reading through and imagining your scenario, I would suggest the following:

     

    1) Set the Items property of your DataCardValue40 to the following:

    With({record: LookUp('Master List', ID = DataCardValue70.Selected.Value)},
    
     Table(
     {Value: record.'Primary Inspection Name',
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser"},
     {Value: record.'Secondary Inspection Name',
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser"}
     )
    )
    

     

    I assume that your Inspector columns is a Multi-Select Choice column in your list.  If so, then the following in your Patch should give you what you want:

    Patch(....
    ...,
    
     Inspector: DataCardValue40.SelectedItems,
    
    ...
    )

     

    However, I would question why a Patch when it appears that you are using an EditForm which has a SubmitForm function.

     

    I hope this is helpful for you.

     

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 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard