cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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

Highlighted
Resident Rockstar
Resident Rockstar

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

Highlighted
Resident Rockstar
Resident Rockstar

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

Highlighted
Helper II
Helper II

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,815)