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 Data Card Base...
Power Apps
Unanswered

Disable Data Card Based on User

(0) ShareShare
ReportReport
Posted on by

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?

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    on at

    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:

    If(User().Email=ThisItem.Person.Email,false,true)

    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:

    If(User().Email=ThisItem.Person.Email,true,false)

    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.

    Regards,

    Michael

  • anatal52 Profile Picture
    8 on at

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

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard