Step 4 Define Work Fields and Lists

LANSA WAM

Step 4. Define Work Fields and Lists

WAM085 - Enhancing the User Interface

1.  In this step you will define additional fields that will be included on the data entry web page ShowPage. The UI for these fields will be manually set up using weblets.

     Define the following additional fields at the top of your WAM definition:

Define Field(#marstat) Type(*char) Length(1) Desc('Marital Status') Default('M')
Define Field(#onleave) Reffld(#std_flag) Desc('On Leave') Colhdg('On' 'Leave') Default('N')
Define Field(#review) Type(*string) Length(512) Desc('Last Review Notes') Input_Atr(LC)
Define Field(#termdte) Type(*date) Desc('Terminate Date') Input_Atr(ASQN ISO) Default(*SQLNULL)

 

2.  Define the following work field and working lists. Ensure that you change iii to your initials.

Define Field(#empnow) Reffld(#empno)
Def_List Name(#savlist) Fields(#empno #GIVENAME #SURNAME #IIIDATE #IIIDTETME #IIITIME #IIICUREMP #IIIGENDER #IIINOTE #marstat #onleave #review #termdte) Type(*WORKING)
Def_List Name(#emplist) Fields((#empno *out) (#GIVENAME *out) (#SURNAME *out) (#IIIDATE *out) (#IIIDTETME *out) (#IIITIME *out) (#IIICUREMP *out) (#IIIGENDER *out) (#IIINOTE *out) (#marstat *out) (#onleave *out) (#review *out) (#termdte *out)) Type(*WORKING)
 

     Note that fields in list EMPLIST all have an *output attribute.

3.  Define the following global web_maps:

Web_Map For(*both) Fields((#stdrentry *hidden))
Web_Map For(*none) Fields(#savlist) Options(*persist)

 

     Note that the list SAVLIST is mapped *none, meaning it is not mapped out to the web page. It has an Options() keyword of *persist. With session management enabled, this list will be saved each time the WAM ends, and will be restored before the first WebRoutine is executed. i.e. every time something starts to run in the WAM.

4.  Save your changes.