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 / Disabling a button whe...
Power Apps
Answered

Disabling a button when a record in Sharefile already contains specific value/text

(0) ShareShare
ReportReport
Posted on by

Hello all,

I have a sharepoint list with several columns for multiple input app screens (each screen pushing out text/values to certain columns). I would like to disable a button accessing each 'record screen' in case when there is a record already in any relevant columns - based on a TextInput field value (on a previous screen) and any value already being present in the list from the 'record screen'.

 

Currently playing with the following code:

If(LookUp('Workflow Reminder-Dpt','Workflow Reminder-Dpt'.ProjectNumber=TextInput1.Text,'Workflow Reminder-Dpt'.ProjectNumber),DisplayMode.Disabled,Edit)

 

The code does not work and I still need to add condition for 'any' other record in certain column.

 

Please has anyone been trying to resolve similar issue?

 

Kind Regards,

 

Ajwou

Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Ajwou ,

    For this scenario.  
    OnSelect Property for Button that Navigating you on Another Screen, 
    you can use code like below.
    Set(ValueExist,LookUp('Workflow Reminder-Dpt','Workflow Reminder-Dpt'.ProjectNumber=TextInput1.Text,'Workflow Reminder-Dpt'.ProjectNumber));
    Now You can use this variable for validation purpose for set the Display Mode for the Button on the screen.
    Like below - 
    If(IsBlank(ValueExist),DisplayMode.Edit,DisplayMode.Disabled)

    See the Reference - 

    VijayTailor_1-1604423718219.png

     

    VijayTailor_0-1604423688475.png

     

    Thanks,
    Vijay

    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."-Vijay

     







  • Ajwou Profile Picture
    on at

    Hi @VijayTailor ,

    Thank you for your help. I have tried using the suggestion below but it hasn't worked. Maybe I didn't explain the issue correctly. See below the actual screens/steps, if that helps:

    Ajwou_0-1604437802641.png

    At the moment I am doing it for one button but the plan is to do similar exercise for the remaining buttons. All records are stored in one SharePoint list, therefore I would be updating the list for each Project Stage (entered details) always checking if the project number and any record from individual stage is already present. 

     

    Kind Regards, 

     

    Ajwou

     

  • Verified answer
    WarrenBelz Profile Picture
    154,494 Most Valuable Professional on at

    Hi @Ajwou ,

    Are you simply looking to see if the project is present? - try this.

    With(
     {
     wDept:
    	 Filter(
     'Workflow Reminder-Dpt',
     ProjectNumber=TextInput1.Text
     )
     },
     If(
     CountRows(wDept)=0
     DisplayMode.Disabled,
     DisplayMode.Edit
     )
    )

    Note the With() statement is only to address Delegation issues.

     

    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.

  • WarrenBelz Profile Picture
    154,494 Most Valuable Professional on at

    Hi @Ajwou ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

  • Ajwou Profile Picture
    on at

    Yes, it worked. Thanks a lot!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard