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

Button to refresh data on datatable.

Hi,

I have a datatable whith this filter in place: 

If(
    IsBlankOrError(dropDown.Selected),
    'myList',
    Filter(
        'myList',
        dropDown.Selected.Title = Title
    )
)

I'm using a dropdown which lists the "Titles" from a different list. When a "Title" is selected that matches the title from the datatable it filters it to it. When a user selects a value from the dropdown it filters just fine, but there is no option to just pull up everything that's  on the list again without reloading the whole app. 

I was thinking about adding a button that will refresh the data on the datatable, but the refresh() function doesn't seem to update anything. 

 

Can anyone point me in the right direction to accomplish this? 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Button to refresh data on datatable.

HI @_sourcecod3_ ,

Do you want to load all records into the Data Table again from your SP List when you press a button within your app?

Is there a Blank value existed within your Dropdown box?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

Set the OnStart property of the App control to following:

ClearCollect(
              TableCollection,
              'myList'
)

 

Set the Items property of the Dropdown box to following:

'yourAnotherList'.Title

Set the OnChange property of the Dropdown box to following:

ClearCollect(
               TableCollection,
               Filter('myList', Title = dropDown.Selected.Title)
)

 

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

TableCollection

Add a Button control (called "Reset Data") within your app, set the OnSelect property to following:

ClearCollect(
              TableCollection,
              'myList'
)

Please consider take a try with above solution, then re-load your app, then check if the issue is solved.

 

In addition, if the Default value within your Dropdown box is Blank, you could also consider take a try with the following workaround:

Add a button control (called "Reset Data") within your app, set the OnSelect property to following:

Reset(dropDown)           /* <-- dropDown represents the Dropdown control in your app */

 

Best regards,

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

2 REPLIES 2
Highlighted
Community Support Team
Community Support Team

Re: Button to refresh data on datatable.

HI @_sourcecod3_ ,

Do you want to load all records into the Data Table again from your SP List when you press a button within your app?

Is there a Blank value existed within your Dropdown box?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

Set the OnStart property of the App control to following:

ClearCollect(
              TableCollection,
              'myList'
)

 

Set the Items property of the Dropdown box to following:

'yourAnotherList'.Title

Set the OnChange property of the Dropdown box to following:

ClearCollect(
               TableCollection,
               Filter('myList', Title = dropDown.Selected.Title)
)

 

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

TableCollection

Add a Button control (called "Reset Data") within your app, set the OnSelect property to following:

ClearCollect(
              TableCollection,
              'myList'
)

Please consider take a try with above solution, then re-load your app, then check if the issue is solved.

 

In addition, if the Default value within your Dropdown box is Blank, you could also consider take a try with the following workaround:

Add a button control (called "Reset Data") within your app, set the OnSelect property to following:

Reset(dropDown)           /* <-- dropDown represents the Dropdown control in your app */

 

Best regards,

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

_sourcecod3_
Level: Powered On

Re: Button to refresh data on datatable.

@v-xida-msft Both of these options worked perfeclty. Thank you so much!

Helpful resources

Announcements
thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,291)