cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DAVIDPOWELL
Post Prodigy
Post Prodigy

make a datatable visible via a button press then off again same button

I have a datatable that when i press a button  i need it to be visible.

When i press the button again the datatable will not be visible.

 

Datatable1

Btn_Appear_disappear

 

Thanks

Dave

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @DAVIDPOWELL set the OnSelect of the button to UpdateContext({ShowDataTable: !ShowDataTable}) and set the visible property of the table to ShowDataTable.

 

The Button text can be something like If(ShowDataTable, "Hide table", "Show Table")

 

Hope this helps

 

View solution in original post

2 REPLIES 2
rubin_boer
Super User
Super User

hi @DAVIDPOWELL set the OnSelect of the button to UpdateContext({ShowDataTable: !ShowDataTable}) and set the visible property of the table to ShowDataTable.

 

The Button text can be something like If(ShowDataTable, "Hide table", "Show Table")

 

Hope this helps

 

View solution in original post

BCLS776
Super User
Super User

Give this a try. In the OnStart property of your app put:

Set(varVisible, true)

 

In the Visible property of the DataTable put:

varVisible

 

Finally, in the OnSelect property of your button put:

Set(varVisible, !varVisible)

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,037)