Hi I’m using open edge 10.2b I'm wondering if it’s possible to reference a database field via a alias. In my example im outputting to excel
I’ve got the temp table name in a alias &scoped-define browse-table ttRecs im looping round the columns on browse to get my data but I cant dynamically say which field I want so I have to do lines and lines of code. Is there any way to make this more generic I know what the field im looking for, just don’t know how to do it via say a char. Any ideas would be great? i.e. a pointer or something?
get first {&browse-name}.
repeat:
process events.
if not available {&browse-table} then
leave.
assign chrLine = ""
intRow = intRow + 1.
do intI = 1 to num-entries(xHeaders):
assign chrVariable = ""
hName = entry(intI,xHeaders).
case hName:
when "grade-code" then assign chrVariable = string({&browse-table}.grade-code) /*want the grade code bit to be in alias or pointer!!*/
I’ve got the temp table name in a alias &scoped-define browse-table ttRecs im looping round the columns on browse to get my data but I cant dynamically say which field I want so I have to do lines and lines of code. Is there any way to make this more generic I know what the field im looking for, just don’t know how to do it via say a char. Any ideas would be great? i.e. a pointer or something?
get first {&browse-name}.
repeat:
process events.
if not available {&browse-table} then
leave.
assign chrLine = ""
intRow = intRow + 1.
do intI = 1 to num-entries(xHeaders):
assign chrVariable = ""
hName = entry(intI,xHeaders).
case hName:
when "grade-code" then assign chrVariable = string({&browse-table}.grade-code) /*want the grade code bit to be in alias or pointer!!*/