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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Condition Support

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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")

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Change your formula to the following:

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

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @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")
     )

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard