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

Hiding all buttons on page until dropdown selected

How do I hide navigation buttons until a dropdown selection is made or the user clicks add new organization? Please see attached example. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Hiding all buttons on page until dropdown selected

@ttaylor 

I would like to share a straight-forward method with you that I would use in your situation.

 

Input this code within the OnVisible property of the screen

Set(showButtons,false)


Then put this code in the OnChange property of the dropdown

Set(showButtons,true)


Finally, put this code in the Visible property for each green button

 

showButtons


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

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: Hiding all buttons on page until dropdown selected

@ttaylor 

I would like to share a straight-forward method with you that I would use in your situation.

 

Input this code within the OnVisible property of the screen

Set(showButtons,false)


Then put this code in the OnChange property of the dropdown

Set(showButtons,true)


Finally, put this code in the Visible property for each green button

 

showButtons


---
Please click "Accept as Solution" if my post answered your question so that 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: Hiding all buttons on page until dropdown selected

There are a couple ways to go about this.  If you just want to prevent the user from accessing the buttons you can disable them until they are applicable.  This has the benefit of giving the user a preview of what they will be able to do once they make a selection.  This can be accomplished by setting the DisplayMode property to DisplayMode.Disabled instead of the default DisplayMode.Edit.  By using a If statement you can control when this is done.   On each button you want to disable, you would enter If(IsBlank(correct name of control that selects the text, e.g. ddCurrentOrg.Selected.Result), DisplayMode.Disabled, DisplayMode.Edit) which will set the DIsplayMode to disabled if no selection has been made and to DisplayMode.Edit if it has.  

 

If you truly do not want to user to see the buttons at all, you will take a similar action, but with the Visible property which requires a true/false value.  Here the statement would be If(IsBlank(correct name of control that selects the text, e.g. ddCurrentOrg.Selected.Result), true, false).  

 

In either case you'll need to figure out the correct control name and syntax for selecting the value from the desired control.

Highlighted
Helper III
Helper III

Re: Hiding all buttons on page until dropdown selected

I just realized that I added a dash in my SharePoint list so when user navigates from the home screen to this screen, I didn't want any organization to show. Does that makes sense?

Highlighted
Super User
Super User

Re: Hiding all buttons on page until dropdown selected

@ttaylor 

Instead, put this code in the Visible property for each green button.  I assume your dash has no leading or trailer spaces.

 

If(Dropdown.Selected.Value<>"-",true,false)

 

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

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

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

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,224)