• 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.

Setting initial Filter value

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

  • Setting initial Filter value

    Trying to set the initial value of a grid filter by creating a program INZRPTOUTQ in t instance library VV52SPL

    ** --------------------------------------------------------------
    p Process b
    d pi
    d thisVLogin s 64c
    d thisID s 10i 0
    d thisUser s 10a
    d dftprtdev s 10a
    /free
    // sample usage...
    //
    // if vvUtility_getCurrentUser() = 'support@cnxcorp.com';
    // SetValue('CCITY':'Chicago');
    // endif;

    ThisVlogin = vvUtility_getCurrentUser(ThisID:ThisUser);
    dftprtdev = *Blanks;
    EXEC SQL
    select print_device into :dftprtdev FROM QSYS2.USER
    where :thisUser=authorization_name;
    //
    SetValue('RPTOUTQ':dftprtdev);
    /end-free
    p e


    specify program name INZRPTOUTQ in initial value program on grid filter config panel
    Attached Files

  • #2
    When app invoked, no value set for RPTOUTQ filter.

    Would like to set the value to the default output queue defined for the user calling the app
    Attached Files

    Comment


    • #3
      Nevermind. Bug was in the copy/paste when I created the source.

      QSYS2.USER should be QSYS2.USER_INFO

      Working as expected.

      ** --------------------------------------------------------------
      p Process b
      d pi
      d thisVLogin s 64c
      d thisID s 10i 0
      d thisUser s 10a
      d dftprtdev s 10a
      /free
      // sample usage...
      //
      // if vvUtility_getCurrentUser() = 'support@cnxcorp.com';
      // SetValue('CCITY':'Chicago');
      // endif;

      ThisVlogin = vvUtility_getCurrentUser(ThisID:ThisUser);
      dftprtdev = *Blanks;
      EXEC SQL
      select print_device into :dftprtdev FROM QSYS2.USER_INFO
      where :thisUser=authorization_name;
      //
      SetValue('RPTOUTQ':dftprtdev);
      /end-free
      p e
      Last edited by jcallahan; 03-29-2020, 08:20 AM.

      Comment

      Working...
      X