pdm_if to handle integer addition operation

Idea created by steed04 Employee on Jul 26, 2017
    Not planned
    Score0

    The customer built a code where pdm_list is used as a looping to increase a counter variable (args.z_counter). The variable starts with value 0 and it is increased according to the pdm_list results (args.z_counter=$args.z_counter+1). Pdm_set is used to set the initial value, as well to increase the variable while pdm_list runs. The final value is used ahead to change the form behavior through pdm_if in order to include or remove certain fields.

     

    Example (1): The code below does not work:

     

    <PDM_SET args.z_counter=9>
    <PDM_SET args.z_counter=$args.z_counter + 1>
    <PDM_SET args.z_counter=$args.z_counter + 1>

     

    <PDM_IF "$args.z_counter" \<= 10>
    <PDM_ELIF "$args.z_counter" \>= 12>
    <PDM_ELSE>
    </PDM_IF>

     

    It does not return the expected result. When args.z_counter is incremented according to the example above, pdm_if is not able to perform the condition properly. In this specific case, it will be always IF, but 9+1+1 is 11 and it should be ELSE.

     

    The idea is:

     

    Pdm_if to able to handle integer addition operation.

     

    Reference:

     

    HTMPL Tags - CA Service Management - 14.1 - CA Technologies Documentation