cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dhiran
Level: Powered On

Refresh Datatables

Hi,

 

I have a screen where I have 2 buttons which set the value of a variable (filterValue) to a text string. I also have a dat table which filters the data source based on the filterValue but it does not seem to update when I click on the either button.

 

Is there a way to refersh the data table on the click of the button.

 

Dhiran

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Refresh Datatables

Hi @Dhiran,

Could you please share more details about the Items proeprty of the Data Table control?

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:12.JPG

 

13.JPG

Set the OnSelect property of the "Available" button to following:

Set(filterValue, "Site Services - Available")

Set the OnSelect property of the "Lost/Stolen" button to following:

Set(filterValue, "Lost/Stolen")

Set the Items property of the Data Table control to following:

Filter('20181204_case5', 'Location/Status'.Value = filterValue) /* <-- 20181204_case5 represents my SP list data source*/

The GIF screeshot as below:Test1.gif

Please check if you have set proper value for the filterValue variable. Also please check if you have typed proper filter condition within your filter formula.

In addition, you could also consider take a try with the following workaround:

Set the OnSelect property of your first button to following:

ClearCollect(
FilteredResult,
Filter('YourDataSource', ColumnName="TextString1")
)

Set the OnSelect proeprty of your second button to following:

ClearCollect(
    FilteredResult, 
    Filter('YourDataSource', ColumnName="TextString2")
)

Set the Items property of the Data Table control to following:

FilteredResult

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Jaos291
Level: Powered On

Re: Refresh Datatables

If the DataTable is connected to a SP list you can Always perform a Refresh(SpListName) on a Behavior formula like OnSelect of a button

Community Support Team
Community Support Team

Re: Refresh Datatables

Hi @Dhiran,

Could you please share more details about the Items proeprty of the Data Table control?

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:12.JPG

 

13.JPG

Set the OnSelect property of the "Available" button to following:

Set(filterValue, "Site Services - Available")

Set the OnSelect property of the "Lost/Stolen" button to following:

Set(filterValue, "Lost/Stolen")

Set the Items property of the Data Table control to following:

Filter('20181204_case5', 'Location/Status'.Value = filterValue) /* <-- 20181204_case5 represents my SP list data source*/

The GIF screeshot as below:Test1.gif

Please check if you have set proper value for the filterValue variable. Also please check if you have typed proper filter condition within your filter formula.

In addition, you could also consider take a try with the following workaround:

Set the OnSelect property of your first button to following:

ClearCollect(
FilteredResult,
Filter('YourDataSource', ColumnName="TextString1")
)

Set the OnSelect proeprty of your second button to following:

ClearCollect(
    FilteredResult, 
    Filter('YourDataSource', ColumnName="TextString2")
)

Set the Items property of the Data Table control to following:

FilteredResult

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Dhiran
Level: Powered On

Re: Refresh Datatables

Thank you for the detailed response. I believe you can only get the refresh to work after you add the Clearcollect statement to the buttons?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 422 members 5,055 guests
Recent signins:
Please welcome our newest community members: