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

 

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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,606)