• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

SetValue of dropdown

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SetValue of dropdown

    Version 6.1.20220912.0

    RPG form helper is trying to SetValue of a dropdown on formRender.
    The Value field of the dropdown is a 2-digit number.
    Doesn't work if the value is < 10.

    Example:

    Data Source
    SELECT cast(0 AS decimal(2)) AS val
    FROM sysibm.sysdummy1

    Form
    The form selects the VAL field, makes it editable, and transforms to a dropdown using inline data:
    number_lookup_data.png
    There's a form helper to SetValue on formRender.

    Code:
    dcl-proc Process;
    dcl-pi *n end-pi;
    
    dcl-s defaultValue char(2) inz('5');
    
    if gMode = 'formRender';
       SetValue('VAL' : defaultValue);
    endif;
    
    end-proc Process;
    If defaultValue is "1", " 1", "5", or " 5" it doesn't work (the dropdown is blank), but "10" and "20" work correctly.


  • #2
    Thanks for reporting, we’ll attempt to replicate and get a fix in.

    We have a 6.1 update possibly coming next week so we’ll see if it can be fixed before that update

    Comment


    • #3
      Can you try trimming the defaultValue variable:

      Code:
      SetValue('VAL':%trim(defaultValue));

      Comment


      • #4
        %trim() looks to have fixed the issue.
        Thanks guys

        Comment

        Working...
        X