You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

  1. Create a new WAM:

         Name: iiiHideTech
         Description: Hiding Techniques
         Layout Weblet: iiilay01

  2. In this step, you will add the RDMLX code to demonstrate different hiding techniques.
    Use the DEFINE command to define the following work fields.

    Field

    Type

    Length

    Default Value

    CLASSHIDE

    *char

    10

    *blanks

    HIDEIF

    *char

    10

    *blanks

    XSLIF

    *char

    10

    *blanks


  3. Create a WebRoutine named HideMain with a description of 'Hiding Techniques'.
         WebRoutine Name(HideMain) Desc('Hiding Techniques')
    Endroutine

     
  4. Add a WEB_MAP for *both. Include the fields you have just created as well as STDRENTRY. Define all as hidden fields as follows:
         Web_Map For(*BOTH) Fields((#CLASSHIDE *HIDDEN) (#HIDEIF *HIDDEN) (#XSLIF *HIDDEN) (#STDRENTRY *HIDDEN))

  5. Add a CASE loop based on STDRENTRY for three different values A, B and C.

    Note: Classes are case sensitive (#CLASSHIDE := 'hidden'). 'hidden' must be lower case. 

    Your code should look like the following:
         Case Of_Field(#STDRENTRY)
    When Value_Is(= A)
    If Cond(#CLASSHIDE = *BLANKS)
    #CLASSHIDE := 'hidden'
    Else
    #CLASSHIDE := *BLANKS
    Endif
    When Value_Is(= B)
    If Cond(#HIDEIF = *BLANKS)
    #HIDEIF := 'HIDE'
    Else
    #HIDEIF := *BLANKS
    Endif
    When Value_Is(= C)
    If Cond(#XSLIF = *BLANKS)
    #XSLIF := 'HIDE'
    Else
    #XSLIF := *BLANKS
    Endif
    Endcase

     The complete WAM source code can be found in WAM 070. Appendix.

  6. Compile your WAM
  • No labels