cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (54,955)