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 / Filtered Gallery does ...
Power Apps
Unanswered

Filtered Gallery does not show as expected outside Powerapps Editor

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

 

So, I have a filtered gallery in the home screen of my app, and it works as expected in the PowerApps editor. However, I tried to test it outside of the editor and what I get is a blank screen. I have no idea how to troubleshoot this. At first, I thought it was the way I nested my If statement, but that wasn't the case after I tried using a non-nested If statement... The code below is what I used to filter the gallery...colHomeMenu is currently in my App OnStart property...

 

 

 

 

 

 

//This filters the home menu according to the role of the logged in user.

If(
 User().Email = Label7_1.Text,
 Filter(
 colHomeMenu,
 Label7.Text in SeenBy
 ),
 If(
 User().Email = lbl_UnitControls_DeptHead.Text,
 Filter(
 colHomeMenu,
 lbl_UnitControls_DeptHead.Text in SeenBy && lbl_UnitControls_DeptHead.Text = User().Email
 ),
 If(
 User().Email in lbl_UnitControls_MemEmails.Text,
 Filter(
 colHomeMenu,
 lbl_UnitControls_MemEmails.Text in SeenBy && User().Email in lbl_UnitControls_MemEmails.Text
 ),
 Filter(
 colHomeMenu,
 lbl_UnitControls_UnitHead.Text in SeenBy && lbl_UnitControls_UnitHead.Text = User().Email
 )
 )
 )
)

 

 

 

 

 

 

AdaEloka_0-1696329200636.png

This is what shows when I test it in the editor which is what it's supposed to be.

 

AdaEloka_1-1696329381619.png

This is what I get when I test it outside the editor.

 

Any help with this will be appreciated. Thank you so much.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,779 Most Valuable Professional on at

    Hi @AdaEloka ,

    For a start try this

    Filter(
     colHomeMenu,
     (
     User().Email = Label7_1.Text &&
     Label7.Text in SeenBy
     ) ||
     (
     User().Email = lbl_UnitControls_DeptHead.Text && 
     lbl_UnitControls_DeptHead.Text in SeenBy
     ) ||
     (
     lbl_UnitControls_UnitHead.Text in SeenBy && 
     lbl_UnitControls_UnitHead.Text = User().Email
     )
    )

    but more importantly, where do you generate colHomeMenu ?

  • AdaEloka Profile Picture
    on at

    Hi @WarrenBelz , it still doesn't work. colHomeMenu is generated in my App OnStart.

  • WarrenBelz Profile Picture
    153,779 Most Valuable Professional on at

    @AdaEloka ,

    Does it work separately on a button ? 

  • AdaEloka Profile Picture
    on at

    Yes it works separately on a button...

  • WarrenBelz Profile Picture
    153,779 Most Valuable Professional on at

    @AdaEloka ,

    On a button in normal play mode ? If so are you displaying the gallery on the first screen ?

  • AdaEloka Profile Picture
    on at

    Yes I put the button on the first screen to test it in play mode. When I click the button in play mode (outside the editor) the gallery displays as I expect it to. This gives me the feeling that App OnStart does not trigger the function as it should...

    I'm thinking that a workaround could just be to put a "start" button on the first screen for the users to click on  to "start" the app.🤷🏾‍♀️

  • WarrenBelz Profile Picture
    153,779 Most Valuable Professional on at

    @AdaEloka ,

    That was where I was heading, but had to make sure OnStart was definitely the issue. If you put the code OnVisible of the first screen, it should work. I assume are also using StartScreen here and I have seen instances before that it triggers before OnStart.

     

    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

     

     

  • AdaEloka Profile Picture
    on at

    I tried putting the code in OnVisible of the first screen and it still didn't work. And yes, you're right I'm also using StartScreen. Could the StartScreen property be what is stopping the OnStart or OnVisible from working? How can I know?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 101 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 70

Last 30 days Overall leaderboard