How to CONFIRM on runtime

I have a problem to insert records in a table on runtime. I want to do an automatic process to create a lot of records on a table… In the OnInsert of the table there are a lot of instruction that I want to do, so I use TABLE.INSERT(TRUE), but one of the instructions of this OnInsert is a CONFIRM line. What can I do to Confirm this “CONFIRM” on runtime? For example I have this function: MyFunction() For a:=1 to 100 do begin Mytable.RESET; Mytable.Number=a; Mytable.INSERT(TRUE) end (…) In the OnInsert of “Mytable” I have: OnInsert() (… a lot of things…) If Number/5 = 0 then CONFIRM(‘Do you want…’) (… a lot of things…) I want to confirm it automatically (if is possible, of course), else the process stay stoped until I confirm it handly. Can you help me?

Hi Ramírez. You have to create a new function with a boolean parameter. This function puts the value of the parameter passed in a global boolean variable of the record. Then, before you call the table’s on insert trigger, you have to call this new function with the value false on the parameter. In the line of the confirm you have to put this code: If (Number/5 = 0) and (ShowConfirm) then CONFIRM(‘Do you want…’) Where showConfirm is the name of the global boolean variable. Hope that helps you. Saludos.

Topic moved from “Sales & Presales Forum” (!!!) to “Attain/Financials Developer Forum”.