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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (8,073)