1. Olan Knight
  2. PowerBuilder
  3. Tuesday, 9 May 2017 23:00 PM UTC

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

Accepted Answer
Mike S Accepted Answer Pending Moderation
  1. Wednesday, 10 May 2017 15:09 PM UTC
  2. PowerBuilder
  3. # Permalink

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.

Comment
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.