Any ideas why this super simple code does not work? The event handler is correct and active. The dynamicDataset is set to Read & Write permissions. It does not update my field to “Accepted”
Thoughts? I am missing something super easy I think?
export function container11_click(event) {
$w("#dynamicDataset").setFieldValue (
"status", "Accepted"
);
}
Hi,
If the variables are spelled correctly the code should work and update the field.
Try saving the data after the update and check if the change is reflected in your actual database:
$w(“#myDataset”).save()
If the database is changed it means that you are actually updating the field as expected.
If the database remains unchanged it is possible that you are using an incorrect variable name (“status”).
Click the ‘more options menu’ (three dots) > Manage Properties, in the relevant column and make sure the Field Key matches the variable you are trying to update.
Adding the .save() fixed it. Thanks Ido!