Form "reset" on Submit Action, Control Query worked but triggered by script don't

Hi,

I just wanted to switch from the control query command (trigger) on submit to run script to pass additional data. Then the form overrides its values before triggering the query.

I have a variable as source for the form. The form is inside a list. Seems like that the run script on submit loads the original data of the variable before calling the query. Of course, the script was made to save this data.

My new trigger:

erbe_tmp_save.trigger({
additionalScope: {
erben_row:i
}
});

I get the right row and the form data, but the form was reseted to original values. Here is the query:

var val=tmp_neuerFall.value;
var erbe=neuer_erbe_form[erben_row].data;
val.erben[erben_row]=erbe;
tmp_neuerFall.setValue(val);

Crazy but if I change the interaction type of the button to default and not submit the calling works as aspected! But obviously then I don't have the form validations.

Seems like a bug or not?
Any idea?

I found it:
Disable: Reset after successful submit

With that selected it reloads the data of the table and because this seams to be faster than calling the javascript it overrides it.

Retool Team i think it would be good to wait for the javascript before resetting the form.

You could uncheck that box .. Reset after successful submit and add it as an Success Event handler in the JS Query so that JS Query always completes first and then the Event handler kicks in

Very good idea! Thank you Scott