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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Function Return...
Power Apps
Answered

Filter Function Returns Empty List to Combo Box

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

I have Gallery1.

Gallery1 has ComboBox1.

When I have ComboBox1 configured as follows the users can see ALL items in the Staking collection in the ComboBox list.

Phineas_0-1719594892949.png

 

I have the need to filter the content of ComboBox1 by three parameters -
   1. Role: Technician or Contractor
   2. Cost Type: 'Subcontractor' or 'In House'
   3. Location


When I use the following in the items of the ComboBox1 I can see all items sorted as desired above. 

If(Role_DataCardValue.Text = "Contractor",Filter(Staking_Collection,Cost_Type = "Subcontractor" && Title =
     Location_Dropdown.Selected.Value).Billing_Unit,

If(Role_DataCardValue.Text = "Technician",Filter(Staking_Collection,Cost_Type = "In House" && Title =
     Location_Dropdown.Selected.Value).Billing_Unit))

Phineas_1-1719595176716.png


However, the other users only see an empty expanded ComboBox1.

What am I missing?

Why does Staking_Collection.Billing_Unit allow the other users to see ALL items in the collection, but the filter formula only shows them the empty box below?

Phineas_2-1719595232473.png

 

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,928 Moderator on at

    Hi @Phineas 

     

    This is a total guess here, but usually this happens because the user (dev) has permissions the others dont

    Or because somehow the persons direct role impacts the filtering and isn't noticed until run time.

     

    Also, normally when you are doing multi-filtering etc like this you write your code a little differently

    SortByColumns(Filter(ManageUsersUserList,
     (IsBlank(MyCmb1.Selected.Value) Or Role = MyCmb1.Selected.Value)
     &&
     (IsBlank(MyCmb2.Selected.Value) Or Role2 = MyCmb2.Selected.Value)
     ),
     "MySortColumn",
     SortOrder.Ascending
    )

     

    Give that a shot and let me know if it helps.

    Also you can check to see if you are getting any weird errors by doing the following

    Step 1. Close your App (stop it running)

    Step 2. Click the Stethoscope in the Top Right

    Step 3. On the bottom click Open Monitor

    Step 4. Once Monitor is running go back and run your app

    Step 5. Cause your issue to happen

    Step 6. Close the app

    Step 7. Go to the Monitor and Filter (top right) based on Error, or key word. Go to the line or lines that match this

    Step 8. Look at the Response Tab and you will have to expand the Body > and the Header >. Then look at the body to see more details on the error
    Do this for each line you find


    Step 9. On each line, also check the Code being executed on Tab 2

     


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Phineas Profile Picture
    5,331 Moderator on at

    To be clear the Combo Box works for me, but not others.

    On Screen1 is Form1, which has Label1 that contains content that clarifies whether the user is a 'Technician' or 'Contractor'.

    Label1 has the following formula - 

    LookUp(Technician_and_Contractor_Collection,Full_Name in Tech__Contractor_Name_Fld_DataCardValue.Text,Role)

    Phineas_4-1719770247637.png

     

    Below is the Monitor and a screenshot of the app when I use the original Combo Box. This is the Combo Box that shows as expanded but empty for others. There is no error associated with the use of the Combo Box.

    The formula in the test Combo Box is - 

    If(
    (Role_DataCardValue.Text = "Contractor"), Filter(Staking_Collection,Cost_Type = "Subcontractor" And Location_Dropdown.Selected.Value in Title)).Billing_Unit

    Phineas_0-1719769547093.pngPhineas_1-1719769612558.png


    Below is the Monitor and a screenshot of the app when I use a test Combo Box. There is no error associated with the use of the Combo Box.

    The following is for a test Combo Box. It is returning the correct data, but it is not distinguishing whether the user is a 'Technician' or 'Contractor'; consequently, all users would see the same data - which is NOT the desired. Combo Box outcome should be based on user type and location chosen.

    The formula in the test Combo Box is as follows - 

    Filter(Staking_Collection,Cost_Type = "Subcontractor" && Location_Dropdown.Selected.Value in Title).Billing_Unit

    Phineas_3-1719769892610.png

    Phineas_2-1719769862769.png

  • Verified answer
    Phineas Profile Picture
    5,331 Moderator on at

    My formula was fine.

     

    It was a name formatting issue in the data source.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 372 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 303 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 238 Super User 2026 Season 1

Last 30 days Overall leaderboard