cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
G99
Level 8

Fx for If condition to display mode edit only else view

Hi,

I'd like to make some fields to be set to Edit if the user is the person entered in the person field, manager field.

I can get this fx to work on the DisplayMode property if i hardcode the email but i want to make this work on a datacardvalue16 but cannot get it to work:

If (User().Email = "email", DisplayMode.Edit, DisplayMode.View)

Anyone know what the fx is to make another field display in edit mode only if the users name is in a previous field?

The DataCardValue16 field is a person field, with the data source SPO.

If I use the following i get red line under =

If (User().FullName = DataCardValue16, DisplayMode.Edit, DisplayMode.View)

1 ACCEPTED SOLUTION

Accepted Solutions
G99
Level 8

Re: Fx for If condition to display mode edit only else view

I was nearly there, figured it out and this works:

 

If (User().Email in DataCardValue16.Selected.Email, DisplayMode.Edit, DisplayMode.View)

View solution in original post

7 REPLIES 7
EricLott
Level 10

Re: Fx for If condition to display mode edit only else view

Try this:

If(User().FullName = DataCardValue16.Text, DisplayMode.Edit, DisplayMode.View)
G99
Level 8

Re: Fx for If condition to display mode edit only else view

 Hi Nope

 

I get a red line under 

 

= and under Text

EricLott
Level 10

Re: Fx for If condition to display mode edit only else view

What about this?

If(User().FullName = DataCardValue16.Email, DisplayMode.Edit, DisplayMode.View)

 

G99
Level 8

Re: Fx for If condition to display mode edit only else view

Nope same issue now under = and Email

 

normally when you type it pre-populates but when i type in Email, or Value or Text these do not

EricLott
Level 10

Re: Fx for If condition to display mode edit only else view

Hmm.. try removing .Email in my example above and just add a dot after DataCardValue16 and see if any suggestions dropdown.

G99
Level 8

Re: Fx for If condition to display mode edit only else view

Nope. cant get this fx to work, did not see any obvious ones from the drop down options to choose from, maybe the fx i'm using is wrong?

G99
Level 8

Re: Fx for If condition to display mode edit only else view

I was nearly there, figured it out and this works:

 

If (User().Email in DataCardValue16.Selected.Email, DisplayMode.Edit, DisplayMode.View)

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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