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 a button based...
Power Apps
Unanswered

Disable a button based on a value that is in a gallery

(0) ShareShare
ReportReport
Posted on by 111

I have a button on the page and I need to disable it if a certain item in the gallery is different from empty

 

Example:

if(IsEmpty(ThisItem.Name) = false; set(varDesablebtn;true);set(varDesablebtn;false))

 

If no value is returned, then I enable the button to add a new one, if it already has a value, it does not show the button.

 

But I'm having trouble because this button is not inside the same gallery as the Name attribute

 

How could I disable this button that is outside the gallery where is the value that I will need to read?

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @JasonCastro ,

     

    You could try:

     

    If(
     IsEmpty(Filter(NameGallery.AllItems,IsBlank(Name))),
     true,
     false
    )

     

    As long as NameGallery has an item with an empty Name, this formula will return false.

     

    Best Regards,

    Bof

  • JasonCastro Profile Picture
    111 on at

    Thx for your help!

    But look at this example, in the situations where I put the red circle the button was not supposed to appear, based on logic.

    By logic, if everything is empty, it shows, if not, it doesn't show

     

    In these situations, the "IsEmpty" of these attributes is always returning false

     

    btn.PNG

     

     

    If(
     IsEmpty(
     Filter(
     Gallery4.AllItems;
     IsBlank(RESULT)
     )
     ) And IsEmpty(
     Filter(
     Gallery4.AllItems;
     IsBlank(OP)
     )
     ) And IsEmpty(
     Filter(
     Gallery4.AllItems;
     IsBlank(INTERVAL)
     )
     );
     true;
     false
    )

     

     

    Is there something wrong in the logic that I'm not noticing or is it in the way of doing the search?

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard