Filtered Gallery does not show as expected outside Powerapps Editor

41 Views Asked by At

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
            )
        )
    )
)

enter image description here

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

enter image description here

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

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

0

There are 0 best solutions below