cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GoGorilla
Helper III
Helper III

Lookup Field Combobox OnChange collection updating all items in the Gallery not just the one

I have a lookup field that is a combobox called Location.  When not blank, this field auto-populates other fields with WorkAddress, WorkCity, and WorkState.  The data is pushed to SharePoint (datasource) properly with the exception of the WorkState field (Dropdown).  I have two issues:

  1. The OnChange property for Location is updating all items in the canvas app instead of just the item.  But, as stated above, it is updating the SharePoint list correctly except for the WorkState.
  2. The WorkState Update property is throwing an error and from all of my research and past experience, the formula looks correct.  The error is "Expected Record Value".  

Here are my formulas on each where PSDR TAA Addresses is a lookup list.  The main datasource is EmpDB:

 

Location.OnChange:  Clear(colLocationUpdate);
ClearCollect (colLocationUpdate,
LULocationDataCardValue.SelectedItems.Value)

 

Location.Update:  LULocationDataCardValue.Selected

 

WorkState.Update:

If(
!IsBlank(LULocationDataCardValue),ForAll(
colWorkState,
{
Id: LookUp('PSDR TAA Addresses',STATE = Result).ID,
Value: LookUp('PSDR TAA Addresses',STATE = Result).STATE
}
))

 

Thank you in advance for your assistance.

 

 

2 REPLIES 2
JordanDeVan
Advocate I
Advocate I

Is the datasource of your gallery the collection or the SharePoint list? Also, what is the name of your gallery?

GoGorilla
Helper III
Helper III

@JordanDeVan The data source for the gallery is a SharePoint List called EmpDB.  My gallery is named Gallery. 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (930)