cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
echodapogi
Frequent Visitor

Help on Disabling button if User Email is not found in SharePoint list

Hello Everyone. I have a situation that. i have 5 users in SharePoint list called "tblUsersEmail". I need to disable a button in PowerApps if the current users cannot found in any of the email data in tblUsersEmail. How can i do that? 

 

Thanks in Advance. 

 

- Echo

1 ACCEPTED SOLUTION

Accepted Solutions
echodapogi
Frequent Visitor

Re: Help on Disabling button if User Email is not found in SharePoint list

@mdevaney  i tried this "If(User().email = tblUserEmail.Title, DisplayMode.Edit, Disabled)" and stillnot working. Sorry i am newbie.

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Help on Disabling button if User Email is not found in SharePoint list

@echodapogi 

Put this code in the DisplayMode property of the button.

If(User().Email in tblUsersEmail.your_column_name, DisplayMode.Edit, DisplayMode.Disabled)

 

Note: you will need to replace your_column_name with the actual column name from your SharePoint table.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

echodapogi
Frequent Visitor

Re: Help on Disabling button if User Email is not found in SharePoint list

@mdevaney  i tried this "If(User().email = tblUserEmail.Title, DisplayMode.Edit, Disabled)" and stillnot working. Sorry i am newbie.

View solution in original post

echodapogi
Frequent Visitor

Re: Help on Disabling button if User Email is not found in SharePoint list

@mdevaney  i made it worked. sorry my bad. i replaced the "=" to "in" i should follow the code you gave me. thank you thank you

Highlighted
Super User
Super User

Re: Help on Disabling button if User Email is not found in SharePoint list

@echodapogi 

You used the EQUALS sign for your code but I used the IN operator.  Use this code.  Make sure the "E" in "Email" is Uppercase.

If(User().Email in tblUserEmail.Title, DisplayMode.Edit, DisplayMode.Disabled)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

echodapogi
Frequent Visitor

Re: Help on Disabling button if User Email is not found in SharePoint list

@mdevaney  Yes. Thank you again. 😉

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (5,488)