Home > Blockchain >  Power apps set button visible if user email is the same as requestors email
Power apps set button visible if user email is the same as requestors email

Time:09-22

I have a form request and i want to let someone edit only his own request except from me and my team that we can always edit. So I need to set edit button visible only for my team and the original creator of the form. I used the user.email to get the email of the user who uses the app but I cant use equality netween this variable and the data card value as its incompatible user type. Text with table. How can i get the email in the data card and compare it to the users email?

Here I want to keep the requestors email from the box filled from a list and this is in read the request screen

CodePudding user response:

actually it's quite easy, your requestorEmail should be coming from some datasource like sharepoint record or datavererse or so on.

You can get current record and then it's property requestorEmail convert it to Text using Text function.

you could also try ThisItem.requestorEmail and with text function you can do so.

Ms Docs should help

In addition if you could show/add code for your requestorEmail data card, I can try to provide exact function to extract email. but above info should lead you in correct direciton

CodePudding user response:

I used on change action of the datacard and used set global variable varUserEmail to thisitem.requestoremail . Then i set the button visible if the user email = varUserEmail.Email . So in this way everytime the email changes to the email that is supposed to edit the request the buttons are visible for editing or deleting the report.

  • Related