Previous Topic: Field-level customization

Next Topic: File-level customization

Example
  1. Use the YWRKELMCST (Work with Element Customization) command to display the various types of element customization.
  2. Use F6 to create a new record with the following values:

    Customization ID: DDL_STATE Sequence no.: 1.00 Customization information: <select name="&&_fldnam"> Customization type: I (Input/Output) Object type/attribute: FLD STS Customization description: Drop-down list for state codes F3=Exit F12=Cancel F13=Fast Exit

  3. Use F6 to create further DDL_STATE records so the following data records are created in YELMCSTRFP:

    Customization ID Customization information DDL_STATE 001.00 <select name="&&_fldnam"> DDL_STATE 002.00 <option selected value=" ">*Select*</option> DDL_STATE 003.00 <option value="CA">California</option> DDL_STATE 004.00 <option value="NY">New York</option> DDL_STATE 005.00 <option value="ND">North Dakota</option> DDL_STATE 999.00 </select>

  4. Enter the CA 2E model and edit the details of the State code field
  5. Press F17 from the EDIT FIELD DETAILS screen to display the Edit Screen Element Customization screen. This screen shows the element details (the fact that it is a field of type STS). Type DDL_STATE in the Customization Identifier input field, press Enter and confirm.

    Element Name: AFCD State code Object Type: FLD Object Subtype: CDE Customization Identifier: DDL_STATE (Use '?' to select) Customization Description: Drop-down list for state codes F3=Exit F12=Cancel F13=Fast Exit

  6. Generate a skeleton for a function where a screen for that function includes the State code field, the customization data you entered in steps 2 and 3 is generated into the skeleton, with the &&_fldnam in the <SELECT> tag being replaced with _Fnnnn where nnnn is the screen offset of the state field on the screen.

    For instance:

    <!--ROW=010 COL=070--> <TD COLSPAN="004" HEIGHT="020"> <!-- Field-level element customization --> <select name="_F0790"> <option selected value=" ">*Select*</option> <option value="CA">California</option> <option value="NY">New York</option> <option value="ND">North Dakota</option> </select> </TD>

  7. When the skeleton is merged with live data into an HTML page and sent to the browser, the drop down list displays as a drop-down list with *Select* being displayed.