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 Platform Community / Forums / Power Apps / Disable a button with ...
Power Apps
Answered

Disable a button with a condition

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I would like a button to be accessible only the first time the user visits and that he fills out the form and validate, once this is done the button should be disabled

 

To do this I would like to apply a condition: if the user has filled in the information, then logically we will find his name and we will be able to compare him with the connected user if we find his name the button is disabled otherwise he can access and enter the information.

 

example of what I want to do, but I have a mistake, probably 'patient'.

 

Screenshot_18.png

I hope I was understandable enough,

Thank you for your help

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    Hi @Anonymous ,

    Is Patient a list or a field in a list?

    Assuming it is a field, try the below - firstly at App OnStart to avoid Delegation issues

    Set(vUserName,User().FullName)

    Then your button DisplayMode

    If(
     IsBlank(
     Lookup(
     YourSPListName,
     Patient=vUserName,
     Patient
     (
     ),
     DisplayMode.Edit,
     DisplayMode.Disabled
    )
     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 
    You’ll want to use LOOKUP to see if the user’s name is already in your datasource

    If(IsBlank(LookUp(your_datasource_name, your_column_name=User().FullName)), DisplayMode.Edit, DisplayMode.Disabled)

     

    Note: my solution assumes your column is single line text

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard