WAM085 - Enhancing the User Interface
This step illustrates how you can create a small response WAM to service any web page that uses an AutoComplete weblet for field employee number (EMPNO).
1. Create a new WAM:
Name: iiiEmpAutoCmpl
Description: Employee Number AutoComplete
Layout Weblet: iiilay01
2. Copy the following WebRoutine from WAM iiiEmpSearch.
WebRoutine Name(Empno_Prompt) Response(*JSON)Web_Map For(*input) Fields(#empno)Web_Map For(*output) Fields((#emp_dd *json))Def_List Name(#emp_dd) Fields(#empno #std_code) Counter(#std_count) Type(*Working) Clr_List Named(#emp_dd)Select Fields(#emp_dd) From_File(pslmst) Where(#std_count <= 3) With_Key(#empno) Options(*startkey *endwhere)#std_code := #empnoAdd_Entry To_List(#emp_dd)EndselectEndroutine
3. Compile the new WAM.