I'm going batty. I have found many posts and blogs on how to do it and no one tells you the same thing twice. I cannot for the life of me figure out how to hide 1 button from everyone except 3 specific people. It's a button that goes to a new screen and we want to test the feedback survey on that screen. If you are a tester, you will see the button at the bottom of the landing page and no one else. I have tried:
- Hardcoding the tester on the button
- Setting the tester as a variable and using the variable
- Looking up a SharePoint list of testers (list is called "Testers", the Title field is the username the Email column is a people picker showing the work email)
I am doing all of this on the OnStart of the app:
Set(
VarUser,
User()
);
Set(
varUserEmail,
User().Email
);
Collect(
SPTesterList,
Testers
);
Set(
varTesterEmail,
varUserEmail = "first.last@company.com"
);
I am not creating a record. I'm doing all of that, but I can't find the right expression to do something with it. Either the button is hidden at all times or it's visible at all times. What am I doing wrong?
What doesn't work:
- Collect(SPTesterList, Testers); Set(currentUser,User()) ; Set(varTesterEmail,LookUp(SPTesterList,Email=currentUser.Email))
- Set(varTesterEmail, varUserEmail = "first.last@company.com");
- If(User().Email = "first.last@company.com" || "first.last@company.com", true,false)
- If(User().Email = "first.last@company.com", true,false)
Any suggestions would be welcome.