cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Can you help me to Filter this Gallery control?

I am loading my Gallery Data Source in the App OnStart:

 

 

ClearCollect(
    ellipsisMenuItems,
    {
        id: 1,
        menuLabel: "Add Photo",
        screen: PhotoCaptureScreen3,
        icon: Icon.Camera
    },
    {
        id: 2,
        menuLabel: "Add Picture",
        screen: AddPictureScreen5,
        icon: Icon.PhotosPictures
    },
    {
        id: 3,
        menuLabel: "Components",
        screen: BillOfMaterialsScreen7,
        icon: Icon.OptionsList
    },
    {
        id: 4,
        menuLabel: "Stock Calculation",
        screen: StockCalcScreen8_1,
        icon: Icon.Waffle
    }
);

 

Under certain conditions, I do not want the Components item to appear.

This Items property somehow manages to exclude ALL the rows from the gallery:

 

If(Star1.Visible, ellipsisMenuItems, Filter(ellipsisMenuItems,Not("Components" in ellipsisMenuItems.menuLabel)))

 

How do I do this correctly?

1 ACCEPTED SOLUTION

Accepted Solutions
Resolver III
Resolver III

You can do the following:

 

If(Star1.Visible, ellipsisMenuItems, Filter(ellipsisMenuItems,"Components" <> menuLabel))

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

View solution in original post

1 REPLY 1
Resolver III
Resolver III

You can do the following:

 

If(Star1.Visible, ellipsisMenuItems, Filter(ellipsisMenuItems,"Components" <> menuLabel))

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (92,067)