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
Unanswered

button disbaled

(0) ShareShare
ReportReport
Posted on by 457

Hi guys,

I have requirement.

 

I have gallery it show the data in label. If the value is wrong I show the error message below the label. If any row has a error, submit button must be disabled. how to achieve this please help me.

 

@Mike8 

@WarrenBelz 

@RandyHayes 

@Pstork1 

@v-xiaochen-msft 

@timl 

@BCLS776 

@Nogueira1306 

@v-bofeng-msft 

@gabibalaban 

 

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

    @Gelos 

    If you are working with a gallery of items and want to determine outside of the gallery if there are issues in it (as you mention the submit button), then you can use the items of the gallery to determine this.

     

    You will need a helper method to determine if there are any labels shown as you cannot determine label visibility outside of the gallery.

     

    So, I would recommend instead of using the Visible property of the error label, to instead use the Text property of the label for your condition.

    Ex.  Instead of something like this on the Visible:  ThisItem.someColumn <> "something"  which would make your error label visible if the condition was met.  Instead set visible to true and use this in the Text property:

    If(ThisItem.someColumn <> "something", "Error", Blank())

     

    NOW - you can reference the Text property of the label outside of the gallery.

    So, for your DisplayMode property of the button, set it to:

    If(CountRows(Filter(yourGallery.AllItems, yourLabel.Text="Error"))>0, Disabled, Edit)

     

    This would give you what you are looking for.

     

    I hope this is helpful for you.

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 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard