Showing results for 
Search instead for 
Did you mean: 
Not applicable

Disable Data Card Based on User

Hi All

Just a quick question, is it possible to disable a data card based on who is looking at an edit form?


For example, in my internal audit app.

I create a non-conformance (which is just a SharePoint list item) and assign that to a person (group finder in SharePoint).

I have 2 fields which we can call 'Auditor Comments' and 'Employee Comments'.

Is it possible so that when a user presses Edit form, only the auditor can edit 'Auditor Comments' but still see what the employee put, and vice versa?

Community Support
Community Support

Re: Disable Data Card Based on User

Hi @Anonymous,


There is a function which could use to get the information for the current user.

User function in PowerApps

For example, if the list tiem is assigned to a person, and there is a field (person or group type field) used to display who owns this item, then we could take use of the User() function to "Hide" the Auditor Comments TextInput Box.


Under the Edit form, first select the Auditor Comments datacard, at the right pane, click Advanced, choose to un-lock this data card, then Insert a Label box into this datacard, change its text property with:

ThisItem.Auditor Comments

Then find its Visible property, change it with the formula below:


Person field here should be the Auditor field in the SharePoint item.

Besides, select the original Textinput Box, change its Visible Property with the following formula:


This would allow to show the Comments Label when user is not Auditor, and show the editBox when user is Auditor.

Post back if you need any further assistance.



Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

Re: Disable Data Card Based on User

You can use the same if function "DisplayMode" property Disabled.

Helpful resources


New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,378)