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 / Trying to set Visible ...
Power Apps
Unanswered

Trying to set Visible based on User().Email and SharePoint list comparison.

(0) ShareShare
ReportReport
Posted on by 34

Good day.

I am new to PowerApps and would like some assistance.

 

I am trying to set the visibility of a container with the following:

 

 

 

 

If(ListName.Email = User().Email, false, true)

 

 

 

Where 'ListName' =  the name of my SharePoint list with simple text emails.

 

But this does not work.

 

Any assistance would be appreciated. Thanks

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @StefanV ,

     

    Nearly there, try:

     

    !Blank(LookUp(ListName, Email = User.Email))

     

    You can leave out the If statement since the condition itself already returns a boolean.

  • StefanV Profile Picture
    34 on at

    Thanks for your response @BCBuizer, but I was still not able to get it to work.

    In the meantime I have created to collections, one with my User().Email and another from a list of Emails in SharePoint. Now i am trying to compare the two and if the User().Email is found in the other collection, I want to change the FormMode of a form.

    If(UserEmail.Value = Users.Email, FormMode.View, FormMode.New)

     

    Where UserEmail = email from the the logged in user and

    User = Collection from Sharepoint list with email addresses

    Now I cannot compare the  two, even though they are both tables?

    Please could you assist wit this?

  • Verified answer
    BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @StefanV ,

     

    Can you please share what is not working for you on the original topic?

     

    On the new question, there's two things:

    1. Is UserEmail a record or a text? From your decription it looks like text, only containing the email address so the '.Value' should be dropped.

    2. Users.Email is a table indeed, so it can't be compared against a text or record using the '=' operator. Rather the 'in' should be used:

     

    If(UserEmail in Users.Email, FormMode.View, FormMode.New)

     

  • StefanV Profile Picture
    34 on at

    Thank you @BCBuizer! That works perfectly...

     

    I was still not able to compare the two tables in the original question, but this now solves my problem, thank you!

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard