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 / PowerApps SharePoint F...
Power Apps
Unanswered

PowerApps SharePoint Form: unable to alter selected items in filtered lookup combo box

(0) ShareShare
ReportReport
Posted on by 4

Hi. Can someone please assist me with this issue? I've only been using power apps for a week now and I feel as if I've hit a wall:

Context:

I have three SharePoint lists:

IMMMatters (the main list), relevant data includes:

Matter Name - Title Field

OrgName - Lookup to IMMOrgs OrgName (single select)

Attorneys - Lookup to IMMAttorneysOrgs (multi select)

IMMOrgs (list of all client organizations)

OrgName - Title Field (name of client organization)

ClientNumber 

IMMAttorneysOrgs (used to indicate which attorneys do work for which clientorganizations); includes:

AttorneyInfo - Title field containing a description of the attorney including name and role- used for attorney lookups.

Organization - Lookup to OrgName in IMMOrgs

The form I am creating in Power Apps is for viewing/adding/editing members of the IMMMatters list. It looks like this:

rishey_0-1716997256708.png

All of the fields in this form work as one would expect except for Attorney, which is a combo box that allows the user to select multiple attorneys from IMMAttorneysOrgs, but the Items are filtered such that this combo box only displays the attorneys in which Organization in IMMAttorneysOrgs = The organization selected in this form.  This filter does appear to work properly. It only displays the attorneys with the correct organization in the combo box. The formula I am using for Items on this attorneys combo box is:

 Filter(
 IMMAttorneysOrgs,
 Organization.Value = OrgCardValue.Selected.Value
 )

The problem I am having arises when I go to edit a record in IMMMatters, if I want to change the members of the attorneys combo box. If I unselect all members and save, that works fine. However, if I attempt to change some of the selected members and save, that's when I get a PATCH ERROR (502).

 

This is what the Update property contains on the Attorneys data card:

ForAll(
 DataCardValue2.SelectedItems,
 {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
 Id: ID,
 Value: Title
}
)

Can someone please shed some insight as to how I can solve this problem?

Thanks in Advance,
Richard 

 

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,831 Super User 2026 Season 1 on at

    Hi @rishey ,

     

    Try deleting the Attorneys DataCard and then add it back.

     

    I think that will resolve all your issues since it will reset the DataCardValue2.Items property to Choices(IMMMatters.Attorneys) and Attorneys_DataCard.Update property to DataCardValue2.SelectedItems.

     

  • rishey Profile Picture
    4 on at

    Thanks but that didn't work. I mean it works if I leave it vanilla but I need the box to filter based on organziation and when I do that as described above with the Filter command, then the update no longer works, so i had to customize it with the ForAll loop, which causes the PATCH error when I attempt to update the selections. 

  • BCBuizer Profile Picture
    22,831 Super User 2026 Season 1 on at

    Hi @rishey ,

     

    Apologies, I missed the filter part.

     

    Please try including a reference to ThisRecord then:

    ForAll(
     DataCardValue2.SelectedItems,
     {
     Id: ThisRecord.ID,
     Value: ThisRecord.Title
     }
    )
  • rishey Profile Picture
    4 on at

    same Issue, I'm afraid. 

  • BCBuizer Profile Picture
    22,831 Super User 2026 Season 1 on at

    Hi @rishey ,

     

    All right, slightly different approach where you add the Organization.Value to the Choices(IMMMatters.Attorneys), use it to filter by and then remove it:

    DropColumns(
    	Filter(
    		AddColumns(
    			Choices(IMMMatters.Attorneys),
    			vOrg,
    			LookUp(
    				IMMAttorneysOrgs,
    				Title = Value,
    				Organization.Value
    			)
    		),
    		vOrg = OrgCardValue.Selected.Value
    	),
    	vOrg
    )

     

    In theory you should be able to set the Attorneys_DataCard.Update property to DataCardValue2.SelectedItems with this.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard