cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ElmerBandoles
Regular Visitor

Hide specific data cards during Edit Mode if the user is not the creator

I am trying to hide the specific data cards during Edit Mode if the user is not the creator. However, I'm having a hard time to interpret it.

 

What I want to happen is if the user email address is equals to  email add of the person who created the item and the display mode is on edit then the result is true, if not then the result is false.

 

Currently what I have is:

If(User().Email=DataCardValue7.Selected.Email,ProjectNameForm.Mode=DisplayMode.Edit,true,false)

 

  • DataCardValue7 = Created by
  • ProjectNameForm is the name of my form

Unfortunately this is not working well, it works separately instead of combined condition. I hope someone could help me on this. Thanks in advance and sorry for my English. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

Code is still not working on me.

 

What I just did is created a Rectangle to cover the fields that I want to have security then make it transparent in color. After that I have just used the code If(User().Email=DataCardValue7.Selected.Email,false,true)  And If(ProjectNameForm.Mode=New,false,true).

 

It hides the square each time the user is the creator. and if not the square will appear but of course you can't see it since it is transparent and once the other user click on edit, they can only click on those fields that the square is not covering. 

View solution in original post

6 REPLIES 6
mdevaney
Super User III
Super User III

@ElmerBandoles 

Your current code looks like this

 

If(
    User().Email=DataCardValue7.Selected.Email,
    ProjectNameForm.Mode=DisplayMode.Edit,
    true,
    false
)

 

I would change it to look like this instead... Please note: the if statement is not necessary to include since the formula will already evaluate to true or false.

User().Email=DataCardValue7.Selected.Email And ProjectNameForm.DisplayMode=DisplayMode.Edit

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

eka24
Super User III
Super User III

Use on visible of the Datacard:
If(ProjectNameForm.Mode=FormMode.Edit&&DataCardValue7.Text=User().Email,false,true)

or just
ProjectNameForm.Mode=FormMode.Edit&&DataCardValue7.Text=User().Email

I have tried this but the condition works separately. it hides the fields when the user is the creator but even if it is not on edit mode. Same with once you are on edit mode, it also hides the field even the user is not the creator.

Hi,

 

Code is still not working on me.

 

What I just did is created a Rectangle to cover the fields that I want to have security then make it transparent in color. After that I have just used the code If(User().Email=DataCardValue7.Selected.Email,false,true)  And If(ProjectNameForm.Mode=New,false,true).

 

It hides the square each time the user is the creator. and if not the square will appear but of course you can't see it since it is transparent and once the other user click on edit, they can only click on those fields that the square is not covering. 

View solution in original post

Please can you copy and paste the formula that did not work. Or you are Ok with the rectangle solution

Both did not work, though formula did not have an error. it just work separately on its conditions.  

If(ProjectNameForm.Mode=FormMode.Edit&&DataCardValue7.Text=User().Email,false,true)

ProjectNameForm.Mode=FormMode.Edit&&DataCardValue7.Text=User().Email

 

Anyway the rectangle solution works with me. Thanks anyway for your help.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (46,308)