I get the errormessage “attempt to execute nested form events” in the QuerySave event.This is (a part) of the code…
Emailbody:=“Completed Action”+ @NewLine+@NewLine+ “This is notification that an incident occurred and the investigation is now complete.”+@NewLine+@NewLine+“Please find the Investigation Form below.”+ @NewLine +@NewLine +"Please click here → ";
@If(HZIChangesNo=“1”;
@If(Compl_1=“Completed”;
@Do(
@SetField(“HZIstatus”;“Submitted”);
@SetField (“status”;“4. Completed”);
@Command([FileSave]);
@SetField(“SaveOptions”;“0”);
@MailSend(HZIdivmgr;HZIsupv;“”;“Health & Safety - Action Complete - The hazard Investigation of “+HZINum +” has been completed”;Emailbody;“”;[IncludeDoclink]);
@Command([FileCloseWindow])
);“”);
@If(HZIChangesNo=“2”;
@If(Compl_1=“Completed” & Compl_2=“Completed”;
@Do(
@SetField(“HZIstatus”;“Submitted”);
@SetField (“status”;“4. Completed”);
@Command([FileSave]);
@SetField(“SaveOptions”;“0”);
@MailSend(HZIdivmgr;HZIsupv;“”;“Health & Safety - Action Complete - The hazard Investigation of “+HZINum +” has been completed”;Emailbody;“”;[IncludeDoclink]);
@Command([FileCloseWindow])
);“”);
@If(HZIChangesNo=“3”;
@If(Compl_1=“Completed” & Compl_2=“Completed” & Compl_3=“Completed”;
@Do(
@SetField(“HZIstatus”;“Submitted”);
@SetField (“status”;“4. Completed”);
@Command([FileSave]);
@SetField(“SaveOptions”;“0”);
@MailSend(HZIdivmgr;HZIsupv;“”;“Health & Safety - Action Complete - The hazard Investigation of “+HZINum +” has been completed”;Emailbody;“”;[IncludeDoclink]);
@Command([FileCloseWindow])
);“”);
… this goes upto HZIChangesNo = 9…
How can I avoid this?