Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

indirect or dynamic access to data

Status
Not open for further replies.

BJZeak

Programmer
May 3, 2008
230
CA
Character base OpenEdge 9.1e

Needing to apply a set of complex data audits on the fly as users add|edit|delete records

On entry we currently create temp tables and use buffer-copy to capture the before images ... on exit we currently hard code all the variations of the expected audits however with the data entry process now becoming tied to external automation the audit process is becoming a huge moving target ... to simplify this target I was exploring creating an audit list of fields with qualifiers ... is there any way to indirectly reference another table.field without doing a runtime compile. Specifically I would like to do something like:

FF TT_EntryHeader.
FL EntryHeader.
FE AuditFieldList WHERE AuditFieldList.FileName = "EntryHeader"
AND AuditFieldList.AuditType = "Primary"
AND EntryHeader.[AuditFieldList.FieldName] <> TT_EntryHeader.[AuditFieldList.FieldName]:

RUN PCD-Audit (INPUT ROWID(AuditFieldList),
INPUT ROWID(EntryHeader),
INPUT ROWID(TT_EntryHeader)).

Not sure if Progress has any other way to reference the fields possibly similar to using rowid's that would allow for fully dynamic runtime processing?
perhaps something like:
VALUE(COLID("EntryHeader." + AuditFieldList.FieldName))

 
I believe what you want to do is to use dynamic queries. Create a query with the table buffer you want to affect and dynamically assign values to the corresponding fields in the audit table (if I understood correctly what you are trying to do).
I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top