I have a repeater displaying items from a Dataset
I would like to click a button to save all these items one by one into another database and then delete the item from the current database
I am using the following code but I cannot figure out how to save the items in another database
export function send_click(event, $w) {
let dataset = $w("#dataset1"); // or the name of your dataset
dataset.onReady(async() => {
while (dataset.getCurrentItem()) {
await dataset.save();
}
});
dataset.onReady(async() => {
while (dataset.getCurrentItem()) {
await dataset.remove();
}
dataset.referesh();
});
}