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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / If user exists in Shar...
Power Apps
Unanswered

If user exists in SharePoint list display gallery items

(0) ShareShare
ReportReport
Posted on by

Hello Community,

 

I have an application that will be used for company people to apply for mobile phone exchange in case they are eligible and that has one of the data base a SharePoint list with a 'Person or Group' column and also in the application i set a variable in the App OnStart for having the username of app user.

I cannot manage to make the application search in that SharePoint list and if the person logged in the application exist in that sharepoint list the gallery with available phones to be displayed and if the logged in person does not exist in the sharepoint to display a message that the person is not eligible.

 

What i have in App OnStart:

Set(kCurrentUser, User());
Set(isEligible, IsBlank(LookUp('Vodafone Database', Nume.Email = kCurrentUser.Email)));

The variable 'isEligible' is working just fine when used in 'app edit mode'/previw but if i open the application from normal user perspective, the variable is not working.

 

Any advice would be appreciated.

Thank you in advance for your support.

Categories:
  • FilipC2 Profile Picture
    on at

    I just noticed that adding ! in front of IsBlank is doing what it is supposed to do if the logged in name does not exist in sharepoint list.

  • hthpowerapper Profile Picture
    364 Super User 2024 Season 1 on at

    The issue you're experiencing seems to be a common one with Power Apps and SharePoint. The main problem here is that SharePoint's 'Person or Group' field is a complex field. When you're checking for the email, it's not enough to simply write Nume.Email = kCurrentUser.Email. The 'Person or Group' field is actually a record itself with multiple properties, one of which is 'Email'.

     

    To access the Email property, you need to use the Value property of the 'Person or Group' field. 

     

    Maybe try something like...

    Set(kCurrentUser, User());
    Set(isEligible, IsBlank(LookUp('Vodafone Database', Nume.Value.Email = kCurrentUser.Email)));
  • FilipC2 Profile Picture
    on at

    Thank you for your input @hthpowerapper ,

     

    Nume.Value.Email it's not a valid in this form.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard