cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Condition Support

I have a Gallery. I have a Toggle. I need a condition.

 

If the Gallery returns ONLY one item, and that item CQTitle is 'Bus Driver' the Toggle.Visible should default to 'false' else 'true. The following is not giving me the desired result.

 

I have this in the Toggle Visible:

(CountRows(ECMmbrCQSmryGallery.AllItems.CQTitle) =1 & (ECMmbrCQSmryGallery.Selected.ECMmbrCQTitleFld.Text="Bus Driver")

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Anonymous 

So from your ScreenShot, that formula is valid...There is one row in the Gallery and the selected (assumed because there is only one row) has "Park Structural Fire Coordinator" in it (assumed that is the ECMmbrCQTitleFld control).

 

However, You are saying you DON'T want that control visible if that condition is met, so change your formula to the following:

!(
   (CountRows(ECMmbrCQSmryGallery.AllItems)=1 && 
   (ECMmbrCQSmryGallery.Selected.ECMmbrCQTitleFld.Text="Bus Driver")
 )

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@Anonymous 

Change your formula to the following:

(CountRows(ECMmbrCQSmryGallery.AllItems)=1 &&(ECMmbrCQSmryGallery.Selected.ECMmbrCQTitleFld.Text="Bus Driver")

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Anonymous
Not applicable

I put this in; I can still see the control I want hidden when the condition present.

 

Condition should say Gallery returns one line, with Park Structural Fire Coordinator only, default the field 'Compliance Status' label to Visible.false (or hidden). There are several 'free-floating' field that don't need to be seen when this condition is true.

 

(CountRows(ECMmbrCQSmryGallery.AllItems)=1 &&(ECMmbrCQSmryGallery.Selected.ECMmbrCQTitleFld.Text="Park Structural Fire Coordinator"))

 

3csman_0-1607722541913.png

 

RandyHayes
Super User
Super User

@Anonymous 

So from your ScreenShot, that formula is valid...There is one row in the Gallery and the selected (assumed because there is only one row) has "Park Structural Fire Coordinator" in it (assumed that is the ECMmbrCQTitleFld control).

 

However, You are saying you DON'T want that control visible if that condition is met, so change your formula to the following:

!(
   (CountRows(ECMmbrCQSmryGallery.AllItems)=1 && 
   (ECMmbrCQSmryGallery.Selected.ECMmbrCQTitleFld.Text="Bus Driver")
 )

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,455)