Hi,
I have a button which I want to have the DisplayMode of Edit if a column on a Dataverse table includes their email address, and Disabled if it doesn't appear in that column. Their email address could appear more than once in this column, but I am only interested if they appear, no matter how many times.
I have tried...
If(First(Filter('DV_Table', 'Manager Email' = User().Email)), Edit, Disabled)
but this errors... any ideas what I'm doing wrong?
Thanks
K
Thanks. I got round it another way by using...
If(CountRows(Filter('DV Table', 'Manager Email' = User().Email)) > 0, Edit, Disabled)
Hi @Kosenurm,
Instead of first + filter, use Lookup. Also, User().Email will give you a delegation warning so I suggest you set that to a variable first then reference the variable in the formula. This also looks like a formula you could reuse elsewhere so you may also want to set the result of this formula to a variable.
In your app OnStart:
Set(EmailVar, User().Email);
Set(IsManager, If(IsBlank(LookUp('DV_Table', 'Manager Email' = EmailVar)), false, true);
Display Mode formula:
If(IsManagerVar, Edit, Disabled)
---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
ankit_singhal
11
Super User 2025 Season 1