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
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

egallis
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
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

egallis
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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,060)