cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
Frequent Visitor

Dear,

 

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

 

Hope this helps

 

Niels

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

New Member

test

It works. Thanks. 

It works. Thank you.

Helpful resources

Announcements
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (10,702)