@_eric I would guess that you are trying to refresh the dataset before it is really updated, because you are not using code. That’s why it is not working. I tried using a Hook to capture the dataset change but could not do it, I guess inserting items through a form uses suppressHooks that cannot be changed.
So the solution I found was putting a 2 seconds delay on the .refresh() method call, like this:
let debounce
export function appcreateButton_click(event) {
$w('#newappBox').hide();
$w('#newappButton2').show();
clearTimeout(debounce)
debounce = setTimeout(async () => {
await $w('#dataset2').refresh()
console.log('Refreshed!')
}, 2000)
}