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

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
Highlighted
Community Support
Community Support

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
Highlighted
Helper II
Helper II

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

Highlighted
Community Support
Community Support

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

Highlighted
Helper II
Helper II

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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