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 form fields ba...
Power Apps
Answered

Disable form fields based on Sharepoint Document Library column

(0) ShareShare
ReportReport
Posted on by 427

Hey everyone,

 

I'm pretty new to Power Apps. I think I'm trying to do something relatively simple but I'm struggling for some hours and can't seem to figure it out. I have a Sharepoint Document Library where documents are uploaded. Users can edit the column properties by the Power App form I created. Now the requirement is that if the column 'Document Status' contains value that all the fields in this Power App form should be disabled. I can't seem to access this 'Document Status' column from my Power App even though the Document Library is connected in Data:

 

The default values of the fields were:

DJanssen_0-1700054754652.png

A Power Automate workflow automatically populates the Document Status column in the Document Library, so the field should only be editable if the column contains no value.

DJanssen_1-1700054819862.png

The expression should probably be something like: 

If(DocumentStatus=! null, DisplayMode.View, DisplayMode.Edit)

 

I'm looking for this behaviour:

DJanssen_2-1700055073600.png

So read/write when the column has no value and read only if it has value.

 

Any help is greatly appreciated!

 

Categories:
I have the same question (0)
  • charlessexton Profile Picture
    Super User 2024 Season 1 on at

    The formula would be:

    If( IsBlank(DocumentStatus), DisplayMode.Edit, DisplayMode.View )
  • DJanssen Profile Picture
    427 on at

    Hey thanks for the reply. 

    I think the formula works, however  for me it complains that it cannot find my DocumentStatus (Name isn't valid. DocumentStatus can't be recognized):

    DJanssen_0-1700059759435.png

    As you can see in my Data I do have the Sharepoint Document Library connected. Am I missing other settings perhaps?

    DJanssen_1-1700059880507.png



  • Verified answer
    charlessexton Profile Picture
    Super User 2024 Season 1 on at

    In the DefaultMode property for your form, you would put something like this:

    If( IsBlank(Self.Updates.DocumentStatus), DisplayMode.Edit, DisplayMode.View )

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