Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Make Button DisplayMode.Disabled if count > 1

(1) ShareShare
ReportReport
Posted on by 181
Hi.
 
I have an app which collects data that will need to be held for 48 hours after being actioned, then deleted. I have a delete button that appears once the status is marked as 'Complete' however I would like the button to be disabled for the first 24 hours. 
 
I have a text box within the gallery which counts the days since the record, I was thinking I could make the buttons DisplayMode.Disabled when the counter value is <2.
 
What would be the code to achieve this?
 
 
  • Verified answer
    Kalel_Lucas Profile Picture
    165 on at
    Make Button DisplayMode.Disabled if count > 1
    Hello Angry_Sys_Admin,
     
    Assuming that text box correctly display the date in days since the alteration of the status to "Complete", you can put the following in the "DisplayMode" property od your delete button:
    If(
        Value(Textbox1.Text) >= 1,
        DisplayMode.Edit,
        DisplayMode.Disabled
    )
     
    Hope it helps,
    Kalel

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,537 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,908 Most Valuable Professional

Leaderboard