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

Syntax with Forall

(0) ShareShare
ReportReport
Posted on by 1,257 Super User 2024 Season 1

Can never quite get the syntax right when using the ForAll.

 

I want a button to be disabled if any of the rows of the gallery have the toggle value as false.  I'm getting the Eof parenthesis error have tried various movings ! of brackets and text but just haven't hit on the right combination...  no major red squigleys just a red dot..

 

This is on the display mode function of the button

 

ForAll(galchange.AllItems,

If(Toggle3.Value=false, DisplayMode.Disabled,DisplayMode.Edit)

TIA

 

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    37,210 Super User 2026 Season 1 on at

    @vffdd 

    On the basis that the button you want to disable is outside of your gallery, I'd suggest that ForAll isn't the appropriate function here and I'd instead call CountRows to count the rows:

    If(
     CountRows(Filter(galchange.AllItems,Toggle3.Value=false)) > 0,
     DisplayMode.Disabled,
     DisplayMode.Edit
    ) 
    

     

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on at

    Thank you as usual @timl   that's perfect 🙂

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard