I am trying to accomplish something similar to the following:
The problem I am having, and maybe it is a progress 'feature', is that none of the temp-table records exist after leaving the trigger. I would just put the somescript2 in the trigger, however, I could have multiple tables and triggers creating records in tt1 and only need to run the somescript2 once. Any insight would be great.
Code:
def temp-table tt1 no-undo
field field1 as char
field field2 as dec
field field3 as char.
on write of db-table new ndb-table old odb-table:
run somescript.p().
create tt1.
assign
tt1.field1 = something
tt2.field2 = something
tt3.field3 = something
.
end. /* on write of db-table */
for each db-table:
empty temp-table tt1.
assign
db-table.field = something
db-table.field2 = something
.
run somescript2.p(input table tt1).
end. /* for each db-table */
The problem I am having, and maybe it is a progress 'feature', is that none of the temp-table records exist after leaving the trigger. I would just put the somescript2 in the trigger, however, I could have multiple tables and triggers creating records in tt1 and only need to run the somescript2 once. Any insight would be great.