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 III
Super User III

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

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 III
Super User III

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

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

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (9,550)