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

Filter by comparing a Lookup field to a text field in two different Dataverse tables

Hello, I am trying to create a nested gallery, where the first gallery displays the Categories and depending on the category selected it should go to a gallery that contains the Awards that fall within that category. for the filter on the second gallery (Awards gallery), I am trying to compare two different fields in two different tables in Dataverse. Table 1 is called Kudos Category, Table 2 is called Kudos Award. Kudos Award table has a lookup field called 'Kudos Category' that gets the category from the Kudos Category table, field name: 'Kudos Category Name' (which is a text input).

 

I have tried:

Filter('Kudos Category'= galKudosCategories.Selected.'Kudos Category Name')

Filter('Kudos Category'.Value = galKudosCategories.Selected.'Kudos Category Name'.Value)

 

and neither of them work

1 ACCEPTED SOLUTION

Accepted Solutions
Lsmits
Frequent Visitor

I figured it out!

 

Because the 'Kudos Category' is a lookup column from Dataverse you need to reference the lookupcolumn.columnameitislookingupfrom eg.

 

Filter('Kudos Awards', 'Kudos Category'.'Kudos Category Name' = galKudosCategories.Selected.'Kudos Category Name')

View solution in original post

4 REPLIES 4
Vikas_Sharma
Helper I
Helper I

Hi @Lsmits 

Please check the syntax of the filter function because It should contain the database name first and then the condition.

In your filter syntax you have not used the database name please add that and then check.

Hope this will work.

 

 

Thanks, Regards

 

 

 

Hi Vikas,

 

yes apologies, it does and it still doesn't work:

 

Filter('Kudos Awards', 'Kudos Category'= galKudosCategories.Selected.'Kudos Category Name')

Filter('Kudos Awards', 'Kudos Category'.Value = galKudosCategories.Selected.'Kudos Category Name'.Value)

 

any suggestions?

 

Lsmits
Frequent Visitor

I figured it out!

 

Because the 'Kudos Category' is a lookup column from Dataverse you need to reference the lookupcolumn.columnameitislookingupfrom eg.

 

Filter('Kudos Awards', 'Kudos Category'.'Kudos Category Name' = galKudosCategories.Selected.'Kudos Category Name')

Hi @Lsmits 

Thanks for your posting here and sharing the solution in the forum as it would be helpful to anyone who encounters similar issues. Please accept your reply as an solution to mark the post as solved so that this thread will be marked for other users to easily identify!

Best Regards.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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