cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Plainace
Level: Powered On

Filter - Driving me crazy

Hi All, been stuck on this for two days and it is driving me crazy 😉

 

Trying to filter results of a gallery (users gallery) by the selected item of a previous Gallery (ExpoGallery). 

 

ExpoNameLookup is a lookup field in Table "ExposPeople"

 

UsersGallery = SortByColumns(Filter(ExposPeople, ExpoNameLookup.Value = ExpoGallery.Selected && StartsWith(Name, UserSearchBox.Text)), "Name", If(SortDescending2, Descending, Ascending))

I'm being told that the " = " is an invalid argument type, and yet " = " is supported by Lookup fields....

 

Any help would be GREATLY appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
NEPatton
Level 8

Re: Filter - Driving me crazy

Oh...what about ExpoGallery.Selected?  This is probably a record, right?  You can't use "=" with a record -- so this is probably the error.

 

You need to specify the field for the selected item in ExpoGallery.

ExpoGallery.Selected.FieldName

View solution in original post

6 REPLIES 6
NEPatton
Level 8

Re: Filter - Driving me crazy

Not sure...one thing to try might be to segregate your condition a bit by adding ().

 

Try...

 

(ExpoNameLookup.Value = ExpoGallery.Selected) && ...

 

With regards to...

StartsWith(Name, UserSearchBox.Text)

 

Is Name a field in ExposPeople?  If not, then this is also probably an issue.

Plainace
Level: Powered On

Re: Filter - Driving me crazy

Unfortunately, that didn't work. I have attached some screenshots: Screen.PNG

 

Also, yes Name is a field within ExposPeople.

I Know I'm close... I just can't get it done.

 

The blue (i) states - This can't be evaluated remotely due to service limitations .... But this is usually just a warning.

NEPatton
Level 8

Re: Filter - Driving me crazy

Oh...what about ExpoGallery.Selected?  This is probably a record, right?  You can't use "=" with a record -- so this is probably the error.

 

You need to specify the field for the selected item in ExpoGallery.

ExpoGallery.Selected.FieldName

View solution in original post

SmartMeter
Level 8

Re: Filter - Driving me crazy

NEPatton is 1000% correct. I am doing the same thing in one of my apps (responsive second gallery) and this code works. 

 

SortByColumns(Filter(Fini**bleep**, Completed = "false", TextIssue = BrowseGallery1.Selected.Title ), "Created", If(SortDescending1, Ascending, Descending))

Plainace
Level: Powered On

Re: Filter - Driving me crazy

ooooh **bleep**. I think we are onto a winner. I had no idea you could not use = with a record.... It's somewhat confusing that it comes up as a suggestion.......

 

Thanks so much for your help. You have saved me heaps and heaps of further head scratching....

NEPatton
Level 8

Re: Filter - Driving me crazy

Anytime 🙂  Glad I could help.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,277)