Previous Topic: Element-level customization

Next Topic: Global Customization

Example

Use the YWRKELMCST (Work with Element Customization) command to display the various types of element customization.

  1. Use F6 to create a new record with the following values:

    Customization ID: DDL_STATE_2 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 (CA/NY only)

                                                                                    
    F3=Exit  F12=Cancel  F13=Fast Exit
    
    
    
  2. Use F6 to create further DDL_STATE_2 records so the following data records are created in YELMCSTRFP:
    DDL_STATE_2  001.00     <select name="&&_fldnam">                              
    DDL_STATE_2  002.00     <option selected value="CA">California</option>
    DDL_STATE_2  004.00     <option value="NY">New York</option>         
    DDL_STATE_2  999.00     </select>                                      
    
  3. Enter the CA 2E model and take option 'S' to the new function to display the screen for that function. Move the cursor to the State code field and press Enter to display the EDIT SCREEN ENTRY DETAILS screen.
  4. Press F17 to display the Edit Screen Element Customization screen. This screen shows the element details (the fact that it is a status field on a particular screen). The Customization Identifier input field is already filled in with DDL_STATE (because it has been implicitly selected at the field-level). Overtype DDL_STATE with DDL_STATE_2, press Enter and confirm.

    Element Name: AFCD State code Object Type: FLD Object Subtype: STS Display File: UUA9EFKD Edit Address Edit file Record Format: ZSFLRCD Subfile record. Screen position: Screen Row: 010 Screen Col: 070 Customization Identifier: DDL_STATE_2 (Use '?' to select) Customization Description: Drop-down list for states (CA/NY only) F3=Exit F12=Cancel F13=Fast Exit

From the EDIT SCREEN ENTRY DETAILS screen, move the cursor to the first line of the Column Headings input field and Press F17 to display the Edit Screen Element Customization screen. This screen now shows the element details for the column heading text itself. Enter *DROP ELEMENT in the Customization Identifier field and press Enter and confirm. Repeat for the second line of Column Headings.

Element Name: AFCD *COLHDG1: 'State code' Object Type: FLD Object Subtype: STS Display File: UUA9EFKD Edit Address Edit file Record Format: ZSFLRCD Subfile record. Screen position: Screen Row: 010 Screen Col: 070 Customization Identifier: *DROP ELEMENT (Use '?' to select) Customization Description: Drop element - do not generate element F3=Exit F12=Cancel F13=Fast Exit

If you 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 are generated into the skeleton, with the &f in the <SELECT> tag being replaced with _Fnnnn where nnnn is the screen offset of the state field on the screen. Additionally, the heading text that would normally be generated into the subfile control is not generated. For instance:

<!--ROW=010 COL=070--> <TD COLSPAN="004" HEIGHT="020"> <!-- Field-level element customization --> <select name="_F0790"> <option selected value="CA">California</option> <option value="NY">New York</option> </select> </TD> When the skeleton is merged with live data into an HTML page and sent to the browser, the drop down list displays *Select* being displayed.

Note: If the Web Option control value YVARTYP is set to *ALL or *SHORT, then all short substitution variables within element customization must be specified without an immediately following alpha character (a-z orA-Z). Any other character (including a blank, single quote or double quote) is acceptable.

If it is required to have, for example, "...value=&vxyz..." and the '&v' should be converted to the relevant value, then the YVARTYP control value should be set to *ALL and the &v should be replaced with its equivalent long-form substitution variable as "...value=&&_fldvalxyz...".