Try OpenEdge Now
skip to main content
ProDataSets
Updating Data with ProDataSets : Tracking changes in the temp-tables of a ProDataSet : ROW-STATE attribute : ROW-STATE function
 
ROW-STATE function
It is not possible to check the value of an attribute such as ROW-STATE in a where-clause. For this reason, there is also a ROW-STATE function that can be referenced in a where-clause to let you filter ProDataSet temp-table rows by their ROW-STATE. The ROW-STATE function takes a buffer name as its argument and returns the same integer value as the ROW-STATE attribute. Ordinarily you should apply the function to a before-table buffer, but you can also use the after-table buffer name as well with the same effect. If there is no record in the buffer passed, or it is not a before-table, or is not an after-table that has a before-table associated with it, then the ROW-STATE value returned is "?". An error is not raised.
The function lets you construct a where-clause, such as in the following example:
FOR EACH <before-table-buf>
  WHERE ROW-STATE(<before-table-buf>) = ROW-MODIFIED:
  ...
END.