web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / If name appears in Dat...
Power Apps
Unanswered

If name appears in Dataverse column, change display mode...

(0) ShareShare
ReportReport
Posted on by 802

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

I have the same question (0)
  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    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.

     

  • Verified answer
    Kosenurm Profile Picture
    802 on at

    Thanks. I got round it another way by using...

     

    If(CountRows(Filter('DV Table', 'Manager Email' = User().Email)) > 0, Edit, Disabled)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard