Reputation: 35
Please assist. Is there a Progress function to check if a record was updated?
For example:
define temp-table myTT no-undo
field tID as integer
field tField as character
index i_dx is primary unique
tID.
define input parameter iAction as character.
define input-output parameter table for myTT.
find first myTT NO-ERROR.
if iAction = "create" then
do:
if not available myTT then
do:
create myTT.
assign myTT.tID = myKeyGenerator("myTT","tID").
end.
assign myTT.tField = "". //assume it had a value if not just created
end.
else if iAction = "update" then
do:
if available myTT and
myTT.tField <> "" then
assign myTT.tField = ""
.
end.
if new myTT then
message "New record" view-as alert-box.
else
do:
//Progress function/attribute needed to check if updated
end.
find next myTT NO-ERROR. //assume a record is available
run myOtherProgram1(buffer myTT). //as a buffer
//Progress function/attribute needed to check if the current record was updated by the call
find next myTT NO-ERROR. //assume a record is available
run myOtherProgram2(input-output table myTT). //as an input-output
//Progress function/attribute needed to check if the current record was updated by the call
The website is asking me to add more detail but my question is just that simple, so this consider this line just that, "detail" and irrelevant. :-)
Upvotes: 0
Views: 928
Reputation: 3379
You can use the buffer-compare
statement or method to compare two buffers.
You can also look at tracking-changes
when using a dataset.
Upvotes: 1