Visual and Programmatic Identifiers

RAMP-TS

Visual and Programmatic Identifiers

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 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 third programmatic identifier (called AKey3) contains the employee number.
  • 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 */
{
   var strEMPNO = objListManager.AKey3[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: