cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rnorris
Helper I
Helper I

invalid argument type when drilling down to lookup list

So I have a SPO list that uses other lists as lookups, and a PowerApps form/app to feed that list. LE is a variable I define thusly: Set(LE, Left(OwningOrg.Selected.Value, 3))

 

Compare the following 2 lines, the first has no error but sets the data source to a sub list, and the record does not get written to parent list, the second gives error 'invalid argument type' when I attempt to drill down to the lookup list column "legal_entity" yet the data source is correct ...

 

If(LE="EFS", Filter('BP Clients', Legal_Entity="EFS"), Filter('BP Clients', Legal_Entity="ESI"))

If(LE="EFS", Filter([@'B&P'].'BP Clients', Legal_Entity="EFS"), Filter([@'B&P'].'BP Clients', Legal_Entity="ESI"))

 

any help appreciated!

21 REPLIES 21

@RandyHayes that last change appears to be the charm! Helping me reach the solution: highly valuable and deeply appreciated! Going further and explaining to my feeble brain (and for others reading this) why it worked: priceless!

 

/Robin

@rnorris 

Robin - SO happy to hear that we got there finally!!

 

As a point of reference, when you want to do this type of filtering on the datasource that a lookup column points to, almost always it works that you can alter a lookup column in the edit form by simply changing the Items property of the combobox to be the Filter statement (as we have it now).  All of the other properties can be left as-is and PowerApps will figure out all the other parts it needs to have the value selected properly and to update the underlying list properly.

Not sure what went wrong in this process, but my guess is that along the way, something about that got changed that we didn't notice.

 

Anyway...result is...it's working for you now 🙂

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (3,365)