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

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
  2. PowerBuilder
  3. # Permalink
0
Votes
Undo

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

Comment
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. Steven Green
  2. Wednesday, 6 June 2018 06:55 AM
There are many options, e.g. library export, store the syntax in the database or build it in your code.

  1. René Ullrich
  2. Wednesday, 6 June 2018 14:15 PM
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.