cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
allyb123
Helper III
Helper III

Look up user and the associated title in the Sharepoint list

Team,

I am checking the app user and finding if the user exists in the SharePoint list. I display the button only if the condition is met.

If(LookUp(Admins4Awards,Admin.Email =User().Email).Title = "Admin for Level2",hidenote, !hidenote).

 

I have three buttons for three different titles. The button is not visible for Admin for Level2. The code above checks only one existence, and it displays the button only for Admin for Level1.  Please correct me.

 

allyb123_0-1664808422730.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@allyb123 

Please consider changing your Formula to the following:

User().Email in ForAll(Filter(Admins4Awards, Title = "Admin for Level2"), Admin.Email)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
Akser
Solution Supplier
Solution Supplier

May I ask why you simply don't use the following formula on button's Visibility? 

 

If(LookUp(Admins4Awards,Admin.Email =User().Email).Title = "Admin for Level2",true, false)
RandyHayes
Super User
Super User

@allyb123 

Please consider changing your Formula to the following:

User().Email in ForAll(Filter(Admins4Awards, Title = "Admin for Level2"), Admin.Email)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks @RandyHayes . It works as expected now

Thanks for checking this @Akser . Randy's solution helped me.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,645)