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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,803)