cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CBI_Oshin
Level: Powered On

Change Displaymode to disabled on a button if an email exists in a specific column in a sharepoint list

Hi,

 

I need to change the Displaymode to disabled on a button if an email exists in a certain column on a sharepoint list. 

The idea is that it will use Office365Users.MyProfile().mail to get the current users email and look up to see if that email exists in the column. If it exists in the column the it will be Displaymode.Disabled if it doesnt exist then it will be Displaymode.Edit.

 

Would be greatful for any suggestions.

 

Thanks!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User
Super User

Re: Change Displaymode to disabled on a button if an email exists in a specific column in a sharepoint list

@CBI_Oshin
You could try putting this code in the DisplayMode property of your button

If(Office365Users.MyProfile().mail in your_datasource_name.your_column_name, Disabled, Edit)

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

View solution in original post

R3dKap
Level 10

Re: Change Displaymode to disabled on a button if an email exists in a specific column in a sharepoint list

Hi @CBI_Oshin,

You could just put the following formula on the DisplayMode property of your button control:

If(IsBlank(LookUp(<YourList>,<YourEmailColumn>=Office365Users.MyProfile().mail)), DisplayMode.Edit, DisplayMode.Disabled)

In other words, if an item in your list does note exist with the user's email then the button is active. Otherwise, it is disabled.

Hope this helps. If it does, please consider accepting this post as the solution.

Emmanuel

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Change Displaymode to disabled on a button if an email exists in a specific column in a sharepoint list

@CBI_Oshin
You could try putting this code in the DisplayMode property of your button

If(Office365Users.MyProfile().mail in your_datasource_name.your_column_name, Disabled, Edit)

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

View solution in original post

R3dKap
Level 10

Re: Change Displaymode to disabled on a button if an email exists in a specific column in a sharepoint list

Hi @CBI_Oshin,

You could just put the following formula on the DisplayMode property of your button control:

If(IsBlank(LookUp(<YourList>,<YourEmailColumn>=Office365Users.MyProfile().mail)), DisplayMode.Edit, DisplayMode.Disabled)

In other words, if an item in your list does note exist with the user's email then the button is active. Otherwise, it is disabled.

Hope this helps. If it does, please consider accepting this post as the solution.

Emmanuel

View solution in original post

CBI_Oshin
Level: Powered On

Re: Change Displaymode to disabled on a button if an email exists in a specific column in a sharepoint list

Thank you this worked!

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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