web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering a gallery by...
Power Apps
Unanswered

Filtering a gallery by true/false value

(0) ShareShare
ReportReport
Posted on by 233

Hello, I have been searching this site and trying all the things from the other Gallery filtering forums and I cant get mine to work. I am trying to filter my "Down_Machine_Gallery" by a true/false value. My data source for the gallery is on a excel doc (Etching_Maintenance_Reports), The column is called 'Machine id Down'.  I want the Galley to not show any records with a false value. Any help would be great. Thanks.

 

Chrisguff12_0-1611179952110.png

 

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: Filtering a gallery by true/false value

    Hi @Chrisguff12 

    Make the items property of your gallery: Filter(Etching_Maintenance_Reports, 'Machine id Down' = "True") 

    or Filter(Etching_Maintenance_Reports, 'Machine id Down' <> "False")  if there are other values other than "False" that you want to show.

  • Chrisguff12 Profile Picture
    233 on at
    Re: Filtering a gallery by true/false value

    Thanks. I swear I had tried that formula before. but i think i missed the ""s. 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: Filtering a gallery by true/false value

    Hi @Chrisguff12 

    I picked it up because in your screenshot True and False are capitalized and would have to be Text.  Text requires double quotes.  If it was just the binary, they would have been lower case. 

  • Chrisguff12 Profile Picture
    233 on at
    Re: Filtering a gallery by true/false value

    One follow up question. in my form I have updated a few fields can you let me know the best way to update the Machine is down field to false at the same time that I'm updating the other three fields? 

    right now i have the update record icon Onselect as - SubmitForm(Down_Machine_Details_Form);ResetForm(Down_Machine_Details_Form);Navigate(SuccessScreen,Fade)

     

    Chrisguff12_0-1611185173374.png

     

     

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: Filtering a gallery by true/false value

    @Chrisguff12 

    We for one thing, don't put anything other than SubmitForm(Down_Machine_Details_Form) in the button.  Put anything else you want to do in the OnSuccess property of the form.  That way your commands will not be executed unless the form actually succeeds in submitting the data.  For example, you wouldn't want to go to the Success Screen unless the submission actually worked!
    As for the rest, 
    I would have the following in your form's  OnSuccess property:

     

    Patch(
     Etching_Maintenance_Reports, Down_Machine_Details_Form.LastSubmit,
     {'Machine id Down':"False"}
    );
    ResetForm(Down_Machine_Details_Form);
    Navigate(SuccessScreen,Fade)

     

    The patch will take the record that was just successfully submitted and make its 'Machine id Down'  value "False" and then execute the reset and navigate functions.

  • Chrisguff12 Profile Picture
    233 on at
    Re: Filtering a gallery by true/false value

    awesome thanks. I didn't know they had a onSuccess property. everything's working great. 

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: Filtering a gallery by true/false value

    Smilegif.gif

     

  • Chrisguff12 Profile Picture
    233 on at
    Re: Filtering a gallery by true/false value

    @Drrickryp 

     

    And then there's this. do you know why the form in not resetting/refreshing? the info on the right is from a closed report. i changed the update record to only have the submitform. and added your last formula to the OnSuccess property. 

     

    Chrisguff12_0-1611191285354.png

     

    Update, I was doing some testing and with the left gallery empty and the right form showing the last closed report. I was able to change the parts replaced and it changed the field in the Excel Doc on OneDrive. If I leave the app the info will be gone but I need to make sure that if my team is working on two reports they don't accidently update the wrong record. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard