web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Refreshing DataTable
Power Apps
Unanswered

Refreshing DataTable

(0) ShareShare
ReportReport
Posted on by 155

Hi,

 

I have a DataTable that I update using code in the OnSelect handler of a button, after the update I want to refresh the data in the DataTable to reflect the change.  I use a Refresh(NameOfMyConnection), but that does not seem to refresh the data in my DataTable.  If I manually do a refresh in the Power Apps UI it does reflect the change.

 

Any ideas?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @mhenderlight 

    In general, you never need to Refresh your datasource, unless you have an external process that is updating your list.

    The question is...what is the Items property of your datatable?  

     

    For example, if your DataTable is based on a datasource, yourDataSource 

    and you do something like: Update(yourDataSource, someCriteria, {someRecord})

    Your datatable will immediately reflect this change.

     

    I hope this is helpful for you.

     

  • mhenderlight Profile Picture
    155 on at

    @RandyHayes 

     

    I'm actually making a call to Patch to update a column in the table:

     

    Patch(Tracking, LookUp(Tracking, 'Student Name (Last, First)'=DataTable1.Selected.'Student Name (Last, First)'), {'Staff Assignment': Dropdown2.Selected.Column1});
    Refresh(Tracking)

     

    But after the Patch is completed, my DataTable does not reflect the change.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @mhenderlight 

    What you are doing works like a charm and updates the datatable immediately, so there has to be another issue at hand.

    Let's review...

    1) Your DataTable Items property is Tracking

    2) Your Staff Assignment column in the Tracking list is a Text column

     

    Please correct/clarify any of the above that are not true.

     

    Also, consider the following change to your formula:

    UpdateIf(Tracking, 
     ID=DataTable1.Selected.ID
     {'Staff Assignment': Dropdown2.Selected.Column1}
    );
  • Max77 Profile Picture
    264 on at

    Hi! I have the same question.

    Have you found the solution? 

  • luismi7 Profile Picture
    2 on at

    I had the same problem, and It was because the data source the Reresh() function was referring to and the data source associated to the DataTable were different:

     

    OnSelect = Refresh(Historial_101_Reserva_1)

    Data Table refering to:  Historial_101_Reserva1

     

    I had 2 data sources with similar names and that was the confusion.

     

    Maybe you should check the data sources you're using and verify that they're the same.

     

    Let me know if it helps.

  • fazo Profile Picture
    4 on at

    Hello, what would be the solution if there is an external process, please? After my table is loaded (Items: TeamSource), another user updates the Sharepoint list which won't be reflected on my side. Therefore, I have created a button to refresh the table to get the latest changes. OnSelect: "Refresh(TeamSource)", but it gives an error.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard