1. Steven Green
  2. PowerBuilder
  3. Tuesday, 5 June 2018 23:25 PM UTC

Hi

I have a requirement where I will need upto 150 N-Up dataObjects eg 1 - 150 columns to be available at runtime

so that I can switch to the appropriate DataObject based on a selection by the end user.

I know I could do this by Hand which I dont really want to do.

I could write a script / program to generate the DataObject syntax (based on an existing DataObject) for each one required and save in a file appropriately .

There may be a better way?

Does anyone know how ?

Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Wednesday, 6 June 2018 06:29 AM UTC
  2. PowerBuilder
  3. # Permalink

You may create the datawindows at runtime using datawindows Create function.

Comment
  1. Steven Green
  2. Wednesday, 6 June 2018 06:55 AM UTC
Thanks I presume you mean something like



String ls_dwsyn, ls_errors

ls_dwsyn = LibraryExport("c:\pb\dwTemp.pbl", &

    "d_emp", ExportDataWindow!)



 



//////MANIPULATE the syntax to achieve the desired N-UP's on dataobject​ with some type of



///// search and replace / insert of syntax



 ///// And then

dw_1.Create(ls_dwsyn, ls_errors)

  1. Helpful
  1. René Ullrich
  2. Wednesday, 6 June 2018 14:15 PM UTC
There are many options, e.g. library export, store the syntax in the database or build it in your code.

  1. Helpful
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.