Hi,
I took over an app from my colleague and she developed a feature in there that allowed access to two buttons only to specific people. Those specific people, as per the code, looks like are either from share point list or the current user submitting the request. I added 2 more people to the share point list to give them admin access but still doesn't work. These people still can't see the button come alive even after re-publishing, refreshing the app.
The 3 screenshots are below:
@Amik you are genius. I think that is the issue. I added their email addresses as their firstname.lastname where as the system is using their username. This fixed my issue. Thank you for working with me on this one.
@sid-agarwal - that's not what I was suggesting. To repeat, I would check if email address being displayed to them in the app is exactly how it appears in your List.
Hi Sid,
Thank you for sharing the details. Could you please send us the code for the default mode of these buttons? This will help us understand the current configuration and why the new users are not able to access the buttons even after being added to the SharePoint list.
Cheers,
@Akshansh-Sharma not sure if I can. I do not want to tamper a lot in this app as it is used widely by people currently.
@Amik anybody who opens that app, it shows their email. Does that help?
shows me my email, shows my colleague their email ID - admins or users alike.
hi @sid-agarwal ,
sometimes email address are not the best way to lookup something specially with sharepoint being the database can you please tell me if there is a chance of adding another column in your 'Admin List_1' which will store the office id/Entra ID of the user?
if yes, then we can use that column to lookup a person from the list by comparing it against User().EntraId which will always give us a single unique value irrespective of the case
--------------------------------------------------------------------------------------------------------------------
Please click Accept as solution if my post helped you solve your issue. If the content was useful in other ways, please consider giving it Thumbs Up 😉
@sid-agarwal - as mentioned earlier, the Lower function is not delegable. However, so long as you can expect your list to remain under 500 rows (or max 2000 if increased via settings), then you can ignore the warning.
Could you:
1. Add a Label control somewhere on your screen and on the Text property, enter:
User().Email
2. Ask your user to open the app and share their screen.
3. Note that if email address being displayed to them in that Label is exactly how it appears in your list.
@Amik Thank you so much.
I added your recommendation. It is still the same, can't get it working.
Also, I am getting a warning now
@sid-agarwal - I suspect being all lower case is the cause of the problem then, as the Email attribute from a SharePoint People field is usually in Proper case.
Consider using non-delegable cast function like Lower to ensure both values are being compared with the same case:
If(
DataCardValue164_1.Selected.DisplayName = Office365Users.MyProfile().DisplayName || !IsBlank(
LookUp(
'Admin List_1',
Lower(EmailAddress) = Lower(User().Email)
)
),
DisplayMode.Edit,
DisplayMode.Disabled
)
On a separate note, while screenshots are very useful, it would also be useful if you could paste your code as text. This saves time having to type it out manually.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1