Hello. Have you tried running a query to whatever is populating that dataset instead of using refresh? My assumption here is that the submit is updating your collection and what you need to do is query the collection again to populate the repeater.
what happens is when they upload data to the dataset, the repeater underneath dosen’t update, unless they press my update button, what I want is just when they hit submit, the dataset refreshed a few seconds afterwards so my client can see the update
@mikkelhmogensen A better approach would be to not connect the button to the dataset submit and handle it all in code. So what you would do:
Remove the connection between the submit button and the dataset submit property.
Add the following code to the $w.onReady() section:
$w (“#NameOfTheSubmitButton”). onClick (( event ) => {
$w ( ‘#dataset2’ ).save()
.then ((response) => {
// data saved!
$w ( ‘#dataset2’ ).refresh()
})
.catch ((error) => {
// Error saving data
console.log(error);
})
});
When the submit button is clicked, this code will save the dataset record and then call the refresh after the save has successfully completed. This way you don’t need to mess around with time delays or multiple events.