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 / Display an icon to off...
Power Apps
Answered

Display an icon to office 365 users that are present in a Sharepoint List.

(0) ShareShare
ReportReport
Posted on by 223

Hi All,

I have 2 SharePoint list as shown below

 

tbl 2.PNG

 

I have added the Officer user 365 connector.

I added a gallery and also an icon within the gallery container and connected it to the table "Department"and i have added the  following code to hide the icon if the logged in users email is not equal to the "Userdetail" table (Email).

 

If(LookUp(UserDetail,UnitID = ThisItem.ID).Email = User().Email,true,false)

 

It actually worked for just each user ID in the "Userdetail" list.

What i want is If aaa@abc.com or bbb@abc.com are logged in, the icon for Department A should be visible but instead it works for only aaa@abc.com .

 

Thanks.

Categories:
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @caslasgee 

     

    This code is only workign for aaa@abc.com because your formula is session based. 

    If aaa@abc.com and bbb@abc.com logged in togehter they are both in different sessions of the app. 

     

    I would suggest to make use of Dataverse and store the data in there. 

    And everytime somebody log in you retrieve the database information. 

    So session based is more client-server and that what you have.

    You want to make it more server-side to actually let it work for all users. 

     

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

     

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @caslasgee,

     

    You are currently searching the first record that matches your UnitID = ThisItem.ID condition. This will retrieve aaa@abc.com for Unit 1 which will not match when bbb@abc.com is logged in.

     

    One approach you could take is to search whether a record exists for the app session user and this row's UnitID:

    //Check whether a record for this user & UnitID exists - if so, return true
    !IsBlank(LookUp(UserDetail,UnitID = ThisItem.ID && Email = User().Email))

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • caslasgee Profile Picture
    223 on at

    @LaurensM As usual, your solution proves to be super useful!. Thanks all the way.

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 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard