Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Gallery filter works in studio but not in app

(1) ShareShare
ReportReport
Posted on by 187

In my canvas app I have three 'dashboard' screens which are set up the same but using different data. The galleries use a Filter function and that references a few combo boxes and two check boxes per screen. There are no delegation warnings.

In Studio, all filters work fine. In the published app only the combo box filters work on two screens. Selecting the check boxes should still display records but no records appear. However, on one of the screens, one of the checkboxes does work.

Also, it worked for a period of time yesterday in the app.

I haven't got any preview or experimental features turned on. Is there anything else I can try?

I do have warnings that I have too many controls on each screen. Could that be it?

  • CAlvy Profile Picture
    187 on at
    Re: Gallery filter works in studio but not in app

    Update: I believe there is a bug related to using my search box component in the gallery filter. If I remove code referencing it from my formula, the published app works perfectly fine. I replaced the component search box with a classic text input box and this works too. So my best bet is to not use the component!

  • Michael E. Gernaey Profile Picture
    41,027 Super User 2025 Season 1 on at
    Re: Gallery filter works in studio but not in app

    That would make sense, since the switch didn't do anything,

  • CAlvy Profile Picture
    187 on at
    Re: Gallery filter works in studio but not in app

    I tested without the Switch in the Items formula but I got the same issue. 

    Next test, I removed all the conditions and left just the data source and this displayed the right number of records. So it looks like something else in my formula which is causing this.

  • CAlvy Profile Picture
    187 on at
    Re: Gallery filter works in studio but not in app

    Yes, I think it's actually excluding the linked records from the gallery. I added a count of records to the dashboard. On one of the dashboards I only had 1 record linked (to both a milestone and interface). Although I have 97 records, it was only displaying 96 without any filters. I linked another record and it displayed 95. However, if I search for the linked record, it will display it and then the checkboxes do work. 

     

    I will remove the Switch and test again to see if that is the cause of the issue.

  • Michael E. Gernaey Profile Picture
    41,027 Super User 2025 Season 1 on at
    Re: Gallery filter works in studio but not in app

    How @CAlvy  about this

     

    Yeah the issue I see though is that just having a boolean value, provides no value to the query.

     

     meaning

     

    Filter('source', a = b, true) doesn't do anything and based on where your ( ) are, thats all your providing is the word true or false.

     


    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

  • CAlvy Profile Picture
    187 on at
    Re: Gallery filter works in studio but not in app

    Hi @FLMike , thanks for having a look and providing some help.

     

    Yes, that's right. It's the same for me and other users when testing in the app. I don't think it's to do with environment or data permissions. The data source is SharePoint. I should have also pointed out that this all used to work fine - the checkboxes used to display the items for myself and users.

     

    I used the Monitor but no errors came up and there wasn't anything unusual with the controls. There are lookups that occurred and warnings which are just 'Formula not delegated' and advising how many rows are scanned but nothing else that looks like a problem. I also tried it with the checkbox that did display items. The only difference was more lookups.

     

    In terms of the Switch function, it might not have been the best way of doing this but I couldn't find another way. Essentially my gallery items data has two lookup columns - one links to 'milestone' data in another SharePoint list and the other to 'interface' data also in SharePoint. When the user selects the Milestone checkbox, they should be able to see on the dashboard all the items which have a lookup to a milestone. The same for the Interface checkbox. If selecting both, they should see items where there is a lookup to milestone and interface. Perhaps there's a better way I can write this into the formula?

  • Michael E. Gernaey Profile Picture
    41,027 Super User 2025 Season 1 on at
    Re: Gallery filter works in studio but not in app

    Hi @CAlvy 

     

    I am trying to determine what you were trying to get out of this

    Switch(Checkbox_Milestones_3.Value, 
     true, 
     !(IsBlank(Linked_Deliverable.Value)), 
     Checkbox_Interfaces_3.Value, 
     true, 
     !(IsEmpty('Linked Interface'))
    ), 

     

    So if CheckBox_milestones_3.value

    When true

    return the boolean value of Linked XXXX

     

    When XXXInterfaces is true,

        return true

     

    and

    Isempty bla bla returns a boolea

     

     

    But what are you using the boolean for to compare against other than its just true or false?


    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

     

  • Michael E. Gernaey Profile Picture
    41,027 Super User 2025 Season 1 on at
    Re: Gallery filter works in studio but not in app

    Sorry for the spam. When you say its not working

    Can you tell me which Contols are tied to that?

  • Michael E. Gernaey Profile Picture
    41,027 Super User 2025 Season 1 on at
    Re: Gallery filter works in studio but not in app

    Hi @CAlvy 

     

    Clarifying questions

    1. when you say it works in Studio, I am assuming you mean when you are testing it? So in that case you are probably an admin in that environment and possibly an admin on the data?

     

    2. When the others test it, or if you also mean it doesnt work for you when Published. Does it point to the same location?

     

    Usually when filters etc fail its for 3 reasons

    1. You have a bug and are lucky it works in Dev

    2. You have a data issue in the environment that the app points too when Not in dev

    3. You have a permissions / security / Auth / AuthX / Role / Environmental Config etc issue where you dont see it in Dev because you are using Dev data and its all nicely popluated

     

    As long as you mean, I publish and then I run the published app and it doesn't work

     

    While I review, please do this.

    Step 1. Close your App (stop it running)
    Step 2. Go to the Apps list in your environment
    Step 3. Find your App and click the 3 ... to get the popup menu

    Step 3b. Click on Run monitor
    Step 4. Once Monitor is running in its own tab, Click the button that says Play Published Version/App
    Step 5. Go to the place in your app, but don't trigger the issue yet, or even if it already did the second you got to the screen ignore it.

    Step 5b. Go to Monitor and Choose Clear Data in the Top Left Corner
    Step 6. Cause the Issue to happen, but only click the one check box


    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

    Now if there are no errors, then do a Filter on your query, so a name of a control or the items property or the name of the control

    And walk through all the Lines of course it does

     

    Just to make sure you aren't hitting some weird permission issue.

    =================================================================

    Next, if this is a different environment, then verify that you have data in that environment that would actually meet your criteria.

     

    I will keep looking at your Filter, especially since I now have the details of it.

  • Michael E. Gernaey Profile Picture
    41,027 Super User 2025 Season 1 on at
    Re: Gallery filter works in studio but not in app

    @CAlvy 

     

    Thanks!! let me look at it now, much better btw truly appreciate you being a good sport 🙂 My old man eyes thank you too hehe

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard