Multiple submit buttons with different GoTo's

On an SPA page I have several form buttons. Buttons 1 and 2 have different GoTo’s.

The problem is that the GoTo’s seem to trigger before the FORM’s on-success actions and therefore the newid (identity) is not processed. So I would like to move the GoTo’s from the Buttons themselves into the “on-success” dynamic event.

Can I do that and use a ternary operation based on the id of the clicked button?

image

Button 1. id=“btn_save_list”
browser1.goto('./report_live')

Button 2. id=“btn_save_cont”
browser1.goto('./report_AD_new?job_id='+ report_new_accident_damage.form_new_accident_damage_report.data.newid)

image

Community Page
Last updated: