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

Re: Make Text DataField view or edit depending on the user

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

Re: Make Text DataField view or edit depending on the user

Dear,

 

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

 

Hope this helps

 

Niels

Highlighted
Community Support
Community Support

Re: Make Text DataField view or edit depending on the user

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

Re: Make Text DataField view or edit depending on the user

test

Highlighted
Frequent Visitor

Re: Make Text DataField view or edit depending on the user

It works. Thanks. 

Highlighted
Frequent Visitor

Re: Make Text DataField view or edit depending on the user

It works. Thank you.

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

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

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,223)