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
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,832)