ANSWERED: How to dynamically create a column DWOBJECT

1
0
-1

PB v12.1 Classic

I have a need to create a DWOBJECT dynamically.

Now, we all know that the standard method is as follows, but it requires that the column name be hardcoded.
        dwobject    ldwo
        ldwo = this.Object.emr_juris_ind

 

What I have done is to use the undocumented function "__get_attribute()" function to accomplish this:
        ls_column = "emr_juris_ind"
        ldwo         = this.Object.__get_attribute (ls_column, true)

      

It works, but I'd rather use a technique that is a wee bit less of a hack.

Does anyone have a different method of dynamically creating a DWOBJECT of type "column"?



Thanks,

Olan

Question Tags: 

Answers

Mike S answered How to dynamically create a column DWOBJECT

1
0
-1

i believe that function call is the only way of getting a dwo object at run time without hardcoding the name.

making this undocumented call a supported call has been an outstanding request to sybase for a very long time.  

I think i had sent this to appeon as one of  my top 12 things to add to PB.   if you ask appeon to add it as a fully supported (web, mobile, server too) feature too that will only help move it up the list of things to do.