cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Stopping a button showing up on edit

Hey, is there a way to use a formula to make a button visible on view but not edit please?

 

I already have an 'IF' formula dictating whether it shows up or not based on the value of another field, but is there a way to also hide it on edit regardless? This is my current formula on visible:

 

If(DataCardValue2.Selected.Value="Shareable",true,false)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper I
Helper I

Re: Stopping a button showing up on edit

Hi @Anonymous ,

 

I was not able to accomplish this earlier, but what I was able to do was that the button is disabled based on this conditions.

On DisplayMode:

If(DataCardValue2.Selected.Value="Shareable",DisplayMode.Edit,View)

 

You may also try:

On Visible:

If(DisplayMode=DisplayMode.Edit,true,false)* (I was not able to get it to work)

 

Hope this helps!

View solution in original post

3 REPLIES 3
Highlighted
Helper I
Helper I

Re: Stopping a button showing up on edit

Hi @Anonymous ,

 

I was not able to accomplish this earlier, but what I was able to do was that the button is disabled based on this conditions.

On DisplayMode:

If(DataCardValue2.Selected.Value="Shareable",DisplayMode.Edit,View)

 

You may also try:

On Visible:

If(DisplayMode=DisplayMode.Edit,true,false)* (I was not able to get it to work)

 

Hope this helps!

View solution in original post

Highlighted
Impactful Individual
Impactful Individual

Re: Stopping a button showing up on edit

If(datacardvalue.selected.value = “whatever” & form.displaymode = displaymode.edit) or something along those lines. Not at computer so can’t verify ;).
Highlighted
Super User
Super User

Re: Stopping a button showing up on edit

@Anonymous 

If you want to hide the button, then use this formula in your Visible property of the button:

 

(DataCardValue2.Selected.Value="Shareable" && !yourForm.DisplayMode=Edit)

 

If you want to disable the button, then use this formula in the DisplayMode property of your button:

 

If(DataCardValue2.Selected.Value="Shareable" && !yourForm.DisplayMode=Edit, Edit, Disabled)

 

Hope that helps.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
secondImage

New Return to Workplace

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

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

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,353)