0
Something wrong in this script.
let s1 := if Status = 1 then 1 else 0 end;
let s2 := if Status = 2 then 2 else 0 end;
let s3 := if Status = 3 then 3 else 0 end;
let check := dialog("Attention", "Are you sure?", ["Delete", "Cancel"]);
if s1 then
let reply := dialog(" 🟢 Audit To History", " This Audit was Completed and will be archived and removed from Events", ["Confirmed", "No Confirmed"]);
if reply = "Confirmed" then
let me := this;
let newR := (create 'History Completed');
newR.('Events Audited' := me);
newR.('Audit No' := me.'Audit Code');
newR.('Project Audited' := me.'Projects_>'.'Project Name');
newR.(Appointment := me.Appointment);
newR.text(Status := me.text(Status));
newR.(Auditor := me.'Auditor_>'.('First Name' + " " + 'Last Name'));
newR.(Audited := me.'To Audit_>'.('First Name' + " " + 'Last Name'));
alert(" Record Archived");
sleep(1000)
else
if check = "Delete" then delete this end
end
else
if s2 then
When the record is complete on 'Choice' field the record copy to 'Audit To History' works perfect, but next need to Delete from the Events table this record, (line 4 and line 20), but first view the option of Delete Record and next the Confirmed Audit although in the end the execution is correct.
Something wrong
3 replies
-
said:
but first view the option of Delete Record and next the Confirmed AuditThe logic only deletes if
1) status = 1
2) if you click on Delete from line 4
3) if you click on Not Confirmed from line 6
So it sounds like you want to put the delete command above the else for if reply = "Confirmed".
Content aside
- Status Answered
- 9 mths agoLast active
- 3Replies
- 37Views
-
2
Following