Refresh object Table

Hi there,

I’m trying to refresh a table connected to a dataset.

First I select a row and get the data to input textbox. So, I change the values and update the data on the collection.

I’m stucked trying to refresh the dataset and table to remove the values that I already changed.

Has someone tried to do something like that ?

Thanks in advance.

Ricardo

There are previous forum posts about it that you can look at:
https://www.wix.com/corvid/forum/community-discussion/is-there-a-way-to-update-an-individual-field-of-a-collection
https://www.wix.com/corvid/forum/community-discussion/update-an-existing-row-in-db-in-new-data
https://www.wix.com/corvid/forum/community-discussion/button-to-submit-data-refresh-database-and-refresh-page

https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#refresh
https://www.wix.com/corvid/reference/wix-data.html#update
https://www.wix.com/corvid/reference/wix-data.html#save
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFieldValue
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFieldValues

Hi givemeawhisky ,

Thank you for your answer. However those posts didn’t help me.

I’m looking for something that I update the value in the collection (I already have it) and the table object refreshes on the screen.

I tried the code “w$(‘table1’).refresh()” or “w$(‘dataset1’).refresh” after the ‘wixData.update(collection, item)’ but when it runs the table updates intermittently. Sometimes it runs correctly and sometimes not.

Thanks,

Ricardo

Hi Ricardo. I need to refresh a table too. Did you find a solution?

@zarboervolk
Show your current running code, related to your described issue.
And next time it would be better to open your own post and describe your own issue, instead of bumping-up old posts.

This way you will get your answer faster.

@russian-dima Thanx for your response. I just need code to refresh the data in a table on one of my pages.
When the visitor submits information it goes into the collection correctly BUT it doesn’t update the table on the page. I want to know how to update (or refresh the table without reloading the entire page.

Thank you.

@zarboervolk Set the .rows property to an emprty array first (“[]”) and then set .rows with new data. That should do the trick.

Hi Giri. Im not sure i understand. So i should send empty data to the table first?