cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Showing a Label well all fields are a specific output!

Hello PowerApps community!
Just getting started with PowerApps 🙂

I have created an application to track the statuses for IT emergencies.
My PowerApp is connected to a SharePoint List. On the SharePoint List, there is a column called "Status" which has 2 potential options:
1. Resolved
2. Open

What I am trying to do:
I'm trying to create a way for the PowerApp to check the Status field to say:
If ALL the values in the "Status" field is "Resolved", then hide this button. Otherwise if there is anything different including "Open", then show this button.

Thanks much and here are some screenshots/documentation!

1. On the button's Visible property, I have tried to add the following:
If(HomeGallery.Selected.Status.Value = "Open", true,false)


*this does not seem to work because it only checks the last value that I clicked on

Attached are some helpful pics!
Button LogicButton LogicThe View of the PowerappThe View of the PowerappNavNav

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Showing a Label well all fields are a specific output!

There are many ways you can do it. One of them is: 

 

If(CountIf(HomeGallery.AllItems, Status.Value = "Open") = CountRows(HomeGallery.AllItems), true, false)

 

I am counting the rows within the gallery for which the status is Open. Then I am counting the total number of rows in the gallery. If the two are equal, then I am setting the visible property to true, if not, then false. 

 

Let me know if this helps. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Showing a Label well all fields are a specific output!

There are many ways you can do it. One of them is: 

 

If(CountIf(HomeGallery.AllItems, Status.Value = "Open") = CountRows(HomeGallery.AllItems), true, false)

 

I am counting the rows within the gallery for which the status is Open. Then I am counting the total number of rows in the gallery. If the two are equal, then I am setting the visible property to true, if not, then false. 

 

Let me know if this helps. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

View solution in original post

Highlighted
Helper I
Helper I

Re: Showing a Label well all fields are a specific output!

Worked like a charm. Thank you so much! 🙂

Highlighted
Super User
Super User

Re: Showing a Label well all fields are a specific output!

Glad it worked! Good luck with the rest of the app! Feel free to reach out in case of any questions!

 

Thanks,

Hardit

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,643)