web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering Gallery base...
Power Apps
Answered

Filtering Gallery based on Label value from LookUp function to another table

(0) ShareShare
ReportReport
Posted on by 292

Hello Power Apps Community,

 

I need some guidance to do gallery filtering using a value on a Label text that comes from LookUp function from another table.

Here is my scenario :

 

1. Lets say i have three table on SQL server

1st : Company

IdCompanyName
1Company_A
2Company_B

 

2nd : Department

IdDepartmentCompany_Id (Foreign Key)
1Technician2
2Sales1
3Administration2

 

3rd : Person

IdNameDepartment_Id (Foreign Key)
1Roy1
2John2
3Amber2
4Frank3

 

 

2. I make gallery in Powerapps to show the Person table

And then i put Label1 inside the gallery to LookUp the value from Department to get the Company_Id

 

LookUp(Department, Id = ThisItem.Id, Company_Id)

 

 

Then i put Label2 inside the gallery to LookUp the value from Company using the value from Label1 to get the CompanyName where i want to actually filter the Person table by their CompanyName

 

LookUp(Company, Id = Value(Label1.Text), CompanyName)

 

 

 

What i have done so far is :

I tried using AddColumns to simulate the join functions in SQL, but i realize that the AddColumns functions has limitation to fetch the data just as much as our settings in here.

rizkyaditya_0-1620289002874.png

If the data is less than 2000, i dont mind using the AddColumns.

But the issue is the table will have more than 2000 rows.

 

 

And then my question is : how to perform that gallery filtering in Person table by their CompanyName without using AddColumns?

Is there any workaround?

Any suggestion will be gladly accepted.

 

PS. I'm just a newbie in SQL so please go easy with your suggestion guys.

Categories:
  • Verified answer
    eka24 Profile Picture
    20,925 on at

    Consider the option of creating a View in your SQL and rather connect the the view to Power Apps

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • rizkyaditya Profile Picture
    292 on at

    Hello sir @eka24 ,

     

    When i connect the view from SQL to powerapps, and i want to lets say add or change the value, what i will be doing is :

    Patch the updated or created value to the actual table instead of the view.

     

    Is my understanding correct before i'm doing this?
    Because when i see it, view from SQL is sort of similar to Collection in powerapps.

  • eka24 Profile Picture
    20,925 on at

    You are right, edit the view in for example a Gallery and Patch to the Original Table not the View.

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • rizkyaditya Profile Picture
    292 on at

    Ok then,
    I will made some test tomorrow, and if everything hopefully going fine, then will mark that as solution Mr. @eka24 !

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard