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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Disable button based o...
Power Apps
Unanswered

Disable button based on gallery

(0) ShareShare
ReportReport
Posted on by 327

Hi All,

 

i want to disable the import button if their is any blank values in the gallery? 

why for some reason if their is a blank value in any control the patch does not pick it up and does not save it in data source so next best thing is to disable the button till all fields are used.

 

screenshot:

moerah_0-1717098497639.png

 

gallery item:

 

With(
 { 
 RowCollection: Filter(
 Split(TextInput2.Text, Char(10)),
 !IsBlank(Value)
 )
 },
 ForAll(
 Sequence(CountRows(RowCollection)),
 Patch(
 Last(FirstN(RowCollection, Value)),
 {rowIDNumber: Value}
 )
 )
)

 

 

controls in gallery:

 

BU_Postcode.Text,BU_Locality.Text,Bu_DOB.Text,Bu_NHC.Text,BU_PInfo.Text,label33.Text

 

 Thank you 😀

Categories:
I have the same question (0)
  • Verified answer
    moerah Profile Picture
    327 on at

    Manage to get it working 

     

    Import Button Onselect:

    If(
     CountRows(
     Filter(
     Gallery1.AllItems,
     !IsBlank(BU_Postcode.Text) &&
     !IsBlank(BU_Locality.Text) &&
     !IsBlank(Bu_DOB.Text) &&
     !IsBlank(Bu_NHC.Text) &&
     !IsBlank(BU_PInfo.Text) &&
     !IsBlank(Label33.Text)
     )
     ) = CountRows(Gallery1.AllItems),
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard