Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Instance list entries always have an identification protocol that defines their visual and programmatic identification. You set these identifiers when you create the filter that controls the instance list.

(Refer to the section The Instance Lists and the List Manager in the Framework guide if you want detailed information about the identification protocol.)

For example this LANSA command in a filter for employees adds entries to the instance list and sets programmatic and visual identifiers and additional columns for them:

     Invoke Method(#avListManager.AddtoList) Visualid1(#Empno) Visualid2(#FullName) Akey1(#Deptment) Akey2(#Section) Akey3(#Empno) AColumn1(#PhoneHme) AColumn2(#Address1) nColumn1(#PostCode)

...

In this identification protocol:

...

  • The second visual identifier (called VisualId2) contains the employee's name.

...

When

...

you

...

know

...

the

...

identification

...

protocol,

...

you

...

can

...

create

...

a

...

JavaScript

...

that

...

displays

...

the

...

number

...

and

...

name

...

of

...

the

...

currently

...

selected

...

employee

...

in

...

the

...

instance

...

list:

...

     /* Get the current instance list details */

...


  uShowEmpDetails : function ()

...

{

   var strEMPNO = objListManager.VisualId1

...

[0

...

];     /* 3rd Akey is the number   */

...


   var strNAME  = objListManager.VisualId2

...

[0

...

]; /* 2nd VisualId is the name */

...



   alert("Current employee number is " + strEMPNO);

...


   alert("Current employee name is " + strNAME);

...


},

Like this:

Image Added

Image Added