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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DataTables showing old...
Power Apps
Answered

DataTables showing old data on New Form

(0) ShareShare
ReportReport
Posted on by 72

I have a SharePoint form and a DataTables control outside the form. 

 

DataTables.items = ComboBox.SelectedItems

 

When I submit the form: 

Patch() > Reset(SharePointForm) > RequestHide()

 

Then when I create a New Form, the DataTables shows the values that were selected before even though the current ComboBox.SelectedItems is empty. 

 

How do I reset DataTables? 

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Does resetting the data table work in your submit function at the end of your submit function work? Reset(DataTable).
    You can try to reset the combobox too.

     

  • simkessy Profile Picture
    72 on at

    I get, "The function expects a resetable control as it's input"

     

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

    @simkessy 

    Yes, the DataTable does not have a Reset capabilty. 

    So, let me get it straight though...your DataTable is only showing the seleted values from your ComboBox?

    Maybe as well...what is the Items property for the ComboBox?

    And...pretty sure I read through the lines on this - we are dealing with SharePointIntegration - yes?

  • simkessy Profile Picture
    72 on at

    Hey, 

     

    So, let me get it straight though...your DataTable is only showing the seleted values from your ComboBox? 
    
     Maybe as well...what is the Items property for the ComboBox?

    My ComboBox.Ttems = 

    AddColumns(ChildList, "Subtext", EmailAddress & " | Active: " & ActiveContract.Value & " | Age: " & age, "ActiveStatusText", ActiveContract.Value)

    And DataTables.Items = "ChildSelector.SelectedItems" which is a combo field on the Form.

     

    And...pretty sure I read through the lines on this - we are dealing with SharePointIntegration - yes?

     

    Yea, I'm customizing the default form. 

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

    @simkessy 

    One other question after looking at your response...

    Is ChildList the name of your datasource or is it a collection?

  • simkessy Profile Picture
    72 on at

    Hey @RandyHayes

     

    ChildList is the name of the secondary list that ParentList looks up using the childItem column

     

    So I have two lists: 

     

    ParentList: 

        - Title: Text Field

        - ChildItem: Multi-Lookup --> ChildList

     

    ChildList: 

        - Title and a few other fields 

     

    The form I'm editing is on ParentList and I'm trying to update and edit Title and ChildItem from ParentList only

     

    DataTable is tied to the ChildItem (SelectedItems) column

     

    Hopefully that clears things up 🙂

     

     

     

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

    @simkessy 

    Yes, that helps, thanks.  Just wanted to make sure we were dealing with datasources and not collections.

     

    So, at a test, take out the ResetForm function that you are using.  See if you see different (and hopefully more accurate) results.

    Let me know what you see from that.

  • Verified answer
    simkessy Profile Picture
    72 on at

    Hey @RandyHayes ,

     

    I did two things and I'm not entirely sure which solved it. I removed the ResetForm() function but I also tied the DataTables to a collection that's created on the "onChange" event of the ComboBox. 

     

    Essentially when the ComboBox is changed I'm using:

     

    ClearCollect(MySelectedItems, ComboBox.SelectedItems)

    Then: "DataTables.Items = MySelectedItems"

     

    This seems to be working pretty well for me now. Thanks your help!

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

    @simkessy 

    Glad that helped you out.  Not sure if it is related or not, but found some similar issue with this refresh problem in this post.  You might want to take a look at that, specifically the most recent post where I added the Refresh function to the form.  Perhaps give that a shot.  I didn't have much time to review the issue yesterday and removing the ResetForm seemed to help, but after having a little more time today, seems that was just a quick-fix with more problems to come.  I have a tendency to think there is an issue with the Integration at the moment, but not sure if it has always been this way or not.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard