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

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)

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,293)