Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Filter gallery with multiple buttons

(0) ShareShare
ReportReport
Posted on by 158

Hello,

 

Please can anyone help me with this one? I have 4 buttons with formula OnSelect: UpdateContext({FilterByWorkIn:!FilterByWorkIn}) and same but different names for other buttons. When I try to apply these to my gallery it will filter only with Work Instructions and Manual Handling. Buttons with Risk Assessment and CoSHH are not working. 

 

marcy_pi_1-1710162159681.png

Regards

 

Categories:
  • Verified answer
    MP-13011217-0 Profile Picture
    MP-13011217-0 158 on at
    Re: Filter gallery with multiple buttons

    I've sorted it now from another post by applying "varFilterBy" to each button and Switch option with "varFilterBy" in Filtered gallery. Thank You for the support 🙂 !

  • BhaskarDhone Profile Picture
    BhaskarDhone 779 on at
    Re: Filter gallery with multiple buttons

    What is the error message ?

  • MP-13011217-0 Profile Picture
    MP-13011217-0 158 on at
    Re: Filter gallery with multiple buttons

    Hi, thank You for this suggestion but it's showing me errors again so not working on my example. Thank You anyways!

  • BhaskarDhone Profile Picture
    BhaskarDhone 779 on at
    Re: Filter gallery with multiple buttons
    Filter(
     'ISO-Documentation',
     (
     Concat('Job description'.Value , Value) = DataCardValue6_1.Selected.Value
     ),
     (FIlterByworkIn && 'Document Type'.Value = "Work Instruction") ||
     (FIlterByManHan && 'Document Type'.Value = "Manual Handling Assessment") ||
     (FIlterByCosh && 'Document Type'.Value = "CoSHH") ||
     (FIlterByRiskAss && 'Document Type'.Value = "Risk Assessment") ||
    )

     

    This should solve your problem.

  • Re: Filter gallery with multiple buttons

    Hi @marcy_pi ,

     

    Do you want to get this?

    Filter all records with a value of CoSHH Assessment or Risk Assessment for the choice column when relevant variables are true?

     

    Please try this:

    1/OnVisible of screen.

    ClearCollect(COL,{A:"work Instructions",B:FIlterByworkIn},{A:"Manual Handling Assessment",B:FIlterByManHan},{A:"CoSHH Assessment",B:FIlterByCosh},{A:"Risk Assessment",B:FIlterByRiskAss})

    2/Add below formula to OnSelect of each button.

    Patch(COL,LookUp(A="work Instructions"),{B:FIlterByworkIn})

    Similar to other buttons.

     

    3/Modify your Filter formula.

    vmengmlimsft_0-1710166232154.png

     

     

     

     

    Best regards,

    Rimmon

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard