Instance List with more than 10 alphanumeric and or 10 numeric additional columns

Visual LANSA Framework

Instance List with more than 10 alphanumeric and/or 10 numeric additional columns

The Framework instance list can display up to 10 alphanumeric and/or 10 numeric additional columns in an instance list. If you want more columns you need to create your own snap-in instance list.  There is no limit as to how many additional columns can be displayed by a snap-in instance list browser.

To create the instance list use the Code Assistant to create most of the required code for you. A working example is shipped in component DF_INST1.

Instance List Browsers are snapped in on the Business Object properties tab Instance List / Relations:

 The simplest technique for a putting an effectively infinite number of additional columns into the instance list is to use the AColumn<symbolic name>(value) and NColumn<symbolic name>(value) properties of the instance list manager.

(Note: This is actually an old technique that has disappeared over time because of the popularity of the newer AColumnN() and NColumnN() parameters on the AddtoList method. This used to be the only way that any additional columns could be used.)   

In the following example filter following this is the salient RDMLX code:

* Make 16 alphanumeric columns with a variety of symbolic names such as BILL, MARY .. A16

  

set #avListManager AColumn<BILL>(#Char07 + BILL)

set #avListManager AColumn<MARY>(#Char07 + MARY)

set #avListManager AColumn<TOTAL>(#Char07 + TOTAL)

set #avListManager AColumn<CUSTNO>(#Char07 + CUSTNO) 

set #avListManager AColumn<A5>(#Char07 + A5)

set #avListManager AColumn<A6>(#Char07 + A6)

set #avListManager AColumn<A7>(#Char07 + A7)

set #avListManager AColumn<A8>(#Char07 + A8)

set #avListManager AColumn<A9>(#Char07 + A9)

set #avListManager AColumn<A10>(#Char07 + A10)

set #avListManager AColumn<A11>(#Char07 + A11)

set #avListManager AColumn<A12>(#Char07 + A12)

set #avListManager AColumn<A13>(#Char07 + A13)

set #avListManager AColumn<A14>(#Char07 + A14)

set #avListManager AColumn<A15>(#Char07 + A15)

set #avListManager AColumn<A16>(#Char07 + A16)

 

* Make 16 numeric columns with a variety of symbolic names such as BILL, MARY ... N16

 

set #avListManager nColumn<BILL>(#Zone07 + 1)

set #avListManager nColumn<MARY>(#Zone07 + 2)

set #avListManager nColumn<TOTAL>(#Zone07 + 3)

set #avListManager nColumn<CUSTNUM>(#Zone07 + 4)

set #avListManager nColumn<n5>(#Zone07 + 5)

set #avListManager nColumn<n6>(#Zone07 + 6)

set #avListManager nColumn<n7>(#Zone07 + 7)

set #avListManager nColumn<n8>(#Zone07 + 8)

set #avListManager nColumn<n9>(#Zone07 + 9)

set #avListManager nColumn<n10>(#Zone07 + 10)

set #avListManager nColumn<n11>(#Zone07 + 11)

set #avListManager nColumn<n12>(#Zone07 + 12)

set #avListManager nColumn<n13>(#Zone07 + 13)

set #avListManager nColumn<n14>(#Zone07 + 14)

set #avListManager nColumn<n15>(#Zone07 + 15)

set #avListManager nColumn<n16>(#Zone07 + 16)

 

* Add this and all 32 additional columns to the instance list

 

Invoke Method(#avListManager.AddtoList) Visualid1(#Char07) Visualid2(#char07) Akey1(#char07)

 

As an example, the line  set #avListManager AColumn<CUSTNO>(#Char07 + CUSTNO) creates an additional alphanumeric column symbolically named CUSTNO and sets it to contain the current value of field #CHAR07 concatenated with the string 'CUSTNO' .

In the associated snap in instant list manager this is the matching RDMLX code:

* Set the visual identifiers into the grid columns

 

#STD_TEXTS := #VisualID1

#STD_TEXT := #VisualID2

 

* Get the additional alphanumeric columns into the grid columns.

* Only 3 are visualized in this example, but all 16 could be display if required

 

#VF_ELXA01 := #AvListManager.Acolumn<BILL>

#VF_ELXA02 := #AvListManager.Acolumn<CUSTNO> 

#VF_ELXA03 := #AvListManager.Acolumn<A16>

 

* Get the additional numeric columns into the grid columns.

* Only 3 are visualized in this example, but all 16 could be visualized if required

 

#VF_ELXNK1 := #AvListManager.Ncolumn<BILL>

#VF_ELXNK2 := #AvListManager.Ncolumn<CUSTNUM>

#VF_ELXNK3 := #AvListManager.Ncolumn<N16>

 

* Add the information to the grid

 

Add_Entry #GRID

 

The line  #VF_ELXA02 := #AvListManager.Acolumn<CUSTNO> shows the additional alphanumeric column named CUSTNO being copied in a grid column field #VF_ELXA02.   

Command handlers can also access the additional columns using the same approach.

In high volume exchanges with a very significant number of additional columns there are possibly more "locked in" (ie: less generic and therefore faster) approaches that might be used to pass additional column information between a filters and an instance list browsers.  

For example, just a single additional column may be used to pass a "row key" between the filter and the snap in instance list browser in the instance list. A unique scope(*Application) shared reusable VL component could be created to manage the storage of and access to logical rows of information, possibly using a SPACE object for efficiency. Both the filter and instance list browser would communicate with it to exchange logical row details.      

Sample Filter using 34 columns (16 alpha, 16 numeric + Visual IDs)

Matching Snap in Instance List Browser