[progress Communities] [progress Openedge Abl] Forum Post: Re: Access A Variable By Its Name.

  • Thread starter Thread starter Patrick Tingen
  • Start date Start date
Status
Not open for further replies.
P

Patrick Tingen

Guest
EQN could do something like this indeed, but you had to 'feed' it with the variables and their values first. It was all processed dynamically and although it has its purposes, I would only recommend this for special scenario's. We have used it to process generic properties that could be defined by the end-users. What Dominik asks is not possible with normal variables, but you can get close by defining a temp-table. You create one record in this table and use the fields as variables. DEFINE VARIABLE cVariable AS CHARACTER NO-UNDO. DEFINE TEMP-TABLE tt NO-UNDO RCODE-INFORMATION FIELD iCounter AS INTEGER FIELD cMyString AS CHARACTER. CREATE tt. ASSIGN tt.iCounter = 3 tt.cMyString = 'Hello world'. cVariable = 'iCounter'. MESSAGE BUFFER tt:BUFFER-FIELD(cVariable):BUFFER-VALUE BUFFER tt:BUFFER-FIELD('cMyString'):BUFFER-VALUE VIEW-AS ALERT-BOX INFO BUTTONS OK.

Continue reading...
 
Status
Not open for further replies.
Back
Top