cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CarolSengol
New Member

Lookup match the user email with column, I want to give visible access to that row if their mail matched with user mail, otherwise hide

I've 3 user values, and those 3 user has edit access to all of the users, that should not be, they can see others data, but they can edit only their data, how this is possible,

 

!IsBlank(LookUp('Daily Utlization', Emails = User().Email,User().Emails)) 

 

But function enable access to all. My expectation is that users can see others data, but possible to edit only their own data.

 

How we can hide the edit button to other users.

 

@lookup hide user edit visible

7 REPLIES 7
eka24
Super User
Super User

Assuming you have a gallery that connects to the form Item. Example Gallery1.Selected, then create a variable OnSelect of an icon inside the Gallery1: Set(MyAccount,ThisItem.Email)

 

On the Visible of the EditButton put: MyAccount=User().Email

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

Thanks a lot Eka!

 

But, I'm not that much techie. Still it shows some Error, Could you please help me here, Do I need to create access control or adding column in this case for defining variable.

 

Attached my sample

 

Cheers

Carol

The second image is fine.

 

With regards to the first image, the formula Set(MyAccount, ThisItem.email) should on the OnSelect of the arrow Icon > inside the Gallery not on the Gallery .

Finally i hope you have a column in your datasource called "email"

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.


@eka24 wrote:

The second image is fine.

 

With regards to the first image, the formula Set(MyAccount, ThisItem.email) should on the OnSelect of the arrow Icon > inside the Gallery not on the Gallery .

Finally i hope you have a column in your datasource called "email"

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.


Thanks Eka

 

Yes, I've a column in my share point list, Image attached, Still issue persist. Thanks for your patience.

 

Cheers

Carol

Intial i made a comment that if your Gallery is connected to the form. But from your images, it seems that is not the Case.

So take this approach:

OnStart of the App:

Set(MyAccount,User().Email)

 

Then in the DefaultMode of the FORM

If(EditForm1.Mode=FormMode.Edit && DataCardValue6.Text="MyAccount",FormMode.View,FormMode.Edit)
 
Note: Change DataCardValue6 to the Textbox that contains the Email field on your FORM
         Also change the EditForm1 to your form Name
        Finally i assume the email column has all the emails including the current logged user
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
 

If possible I'll share the app to you can have check.

 

But I need your mail to share.

I have sent it to you private mail

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (3,252)