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

getsqlstatement() in call versus

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

  • getsqlstatement() in call versus

    Hello,

    If i call an rpg program via the utility call rpg program/url the getsqlstatement works. If i change this to call the program via launch app/urp using an event listener my getsqlstatement returns blank. (in the rpg program when i debug) is this not possible/

  • #2
    I am not clear, the Launch App/URL action is allowing you to enter in an RPG program and it calls it?

    Comment


    • #3
      yes one of our other developers created a script that calls an rpg program so that we can set the lda for print settings below is the script. if you want i can send the complete pdf in a separate email.


      Code:
      let eventName = `PRINT_${getAppVar('myAppId')}`;
      
      let eventCallback = (eventResponse) => {
          console.log('Event response:', eventResponse);
          let parms = {
              pgm: getAppVar('printProgram'),
              report: getAppVar('reportName'),
              reportTitle: getAppVar('reportTitle'),
              action: 'Process',
              group: getAppVar('groupID'),
              emailYN: eventResponse.emailYN,
              emailUser: eventResponse.emailUser,
              outqYN: eventResponse.outqYN,
              outq: eventResponse.outq,
              copies: eventResponse.copies,
              drawer: eventResponse.drawer,
              duplex: eventResponse.duplex,
              holdYN: eventResponse.holdYN,
              saveYN: eventResponse.saveYN
          };
      
          Ext.Ajax.request({
              url: '/valence/vvcall.pgm',
              params: parms,
      
              scope: this,
      
      
              success: function(response) {
                  var data = Ext.decode(response.responseText);
                  if (data.success) {
                      setAppVar('nabInfo', 'Successfully submitted');
                  } else {
                      setAppVar('nabMsg', data.errorMsg);
                  }
              },
              failure: function() {
                  setAppVar('nabMsg', '<em>Failure</em><hr /> ' + 'Call to print program failed.');
              }
          });
      };
      
      Valence.util.Helper.addEventListener(eventName, eventCallback, this);
      
      success();
      Last edited by sean.lanktree; 04-25-2022, 09:30 AM.

      Comment


      • #4
        Sorry, I still am not clear on where your EXNABBTN based RPG program is being called. Can you post a screenshot of the behaviors section where the Call RPG Program is not working properly for you?

        Comment


        • #5
          see attached
          Attached Files

          Comment


          • #6
            Your screenshot shows you are launching another application, where are you calling the EXNABBTN based RPG program?

            Comment


            • #7
              i am not and i think that is the issue.. i am going to try and change my rpg program to use the set widget before calling the getsqlstatement to see if that works...the event listener is calling the rpg program but i dont think it knows what widget is associated to the getsqlstatement.

              Comment


              • #8
                Please send an email to support@cnxcorp.com to setup an online meeting.

                Comment

                Working...
                X