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 / How to filter a combo ...
Power Apps
Answered

How to filter a combo box with hidden items and by department of logged user

(0) ShareShare
ReportReport
Posted on by 73

Hi All, 

 

I have this code which basically filters data which is coming from a SharePoint list called 'QA Reps', and there is a field Hide which is used in the filter command of the combo box to hide items in the combo box which are not needed. The field/column which i am displaying in the combo box is called QA_Rep_Name   

 

Here is the code which is working perfectly:

 

Filter(AddColumns('QA Reps',"hideVal",Hide),!hideVal).QA_Rep_Name

 

The SharePoint List 'QA Reps' also contains a field/Column Called Department and I want to modify the code so that the filter also filters items where the Department field/column (coming from 'QA Reps' SharePoint list) matches varUser.MyProfile.department which is coming from Azure

 

Any help would be greatly appreciated 🙂

 

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @kriscachia ,

    You did not say what type of field Department is, but assuming Text

    Filter(
     AddColumns(
     'QA Reps',
     "hideVal",
     Hide
     ),
     !hideVal &&
     Department = varUser.MyProfile.department
    ).QA_Rep_Name

    I am also wondering why you are bothering with the AddColumns

    Filter(
     'QA Reps',
     !Hide &&
     Department = varUser.MyProfile.department
    ).QA_Rep_Name

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • kriscachia Profile Picture
    73 on at

    Hi @WarrenBelz 

     

    Yes correct Department is Text 

     

    Your code with AddColumns worked perfectly just as i needed. 

     

    Without AddColumns the combo box didnt filter the results correctly. It filtered the Hidden rows but the department didnt get filtered. 

     

    So i went with the add columns code. Thanks alot for your help much appreciated 

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard