cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Kudo Kingpin
Kudo Kingpin

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
Highlighted
Kudo Kingpin
Kudo Kingpin

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.

Highlighted
Frequent Visitor

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.

Highlighted
Kudo Kingpin
Kudo Kingpin

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

Highlighted
Helper V
Helper V

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))

Highlighted
Frequent Visitor

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....

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Filter - Driving me crazy

Anytime 🙂  Glad I could help.

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,421)