cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Make Text DataField view or edit depending on the user

Hello,

 

I've created an Edit form. Now, I want to make text field View or Edit depending on the user who is logged in.

 

I've create a variable called OnStart called "varUserEmail". 

kbansal_2-1572453011603.png

 

Then, for one of the DataCard I've put it in the Visible field

"If (varUserEmail in ["Test@email.com", "Test1@email.com"],DisplayMode.Edit, DisplayMode.View)".

But it is not working. This formula is just making that data field non visible. 

kbansal_1-1572452984307.png

Please let me how can I achieve this function.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @kbansal ,

 

The Visible property is to control if the data card can be seen.

If you want to change the display mode, you have to apply your formula to DisplayMode property.

I have made a test, and it work well.

Annotation 2019-10-31 172025.png

Hope this helps,

Best regards,

Sik

If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

 

View solution in original post

5 REPLIES 5
Highlighted
Frequent Visitor

Dear,

 

Try to add your function into the DisplayMode attribute of the desired control.

 

Hope this helps

 

Niels

Highlighted
Community Support
Community Support

Hi @kbansal ,

 

The Visible property is to control if the data card can be seen.

If you want to change the display mode, you have to apply your formula to DisplayMode property.

I have made a test, and it work well.

Annotation 2019-10-31 172025.png

Hope this helps,

Best regards,

Sik

If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

 

View solution in original post

Highlighted
New Member

test

Highlighted

It works. Thanks. 

Highlighted

It works. Thank you.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,554)