Announcement

Collapse
No announcement yet.

Retrieving optional parameters using RPG

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

  • Retrieving optional parameters using RPG

    Hi,

    As part of an option definition I have 'Optional Parameters' set to 'operation=A&currentRequestNumber=1'.

    Within the RPG program I am trying to get these parameter values but without any success.

    p getPostData b
    d pi
    /free

    @operation = vvIn_char('operation');
    @request = vvIn_num('currentRequestNumber');
    @operation2 = vvIn_char('OPERATION');
    @request2 = vvIn_num('CURRENTREQUESTNUMBER');

    DUMP;

    /end-free
    p e

    The javasript is calling this program (as I am getting a dump).
    Javascript snippet:

    function loadParms(){

    Ext.Ajax.request({
    url: 'vvcall.pgm',
    params: {
    pgm: 'PRW020',
    action: 'GetOptParms'
    },
    success: function(response){
    var check = response.responseText;
    if (check) {
    var data = Ext.util.JSON.decode(response.responseText);
    if (data.SUCCESS == '1') {
    alert('operation: ' + data.OP);
    alert('currentRequestNumber: ' + data.CRN);
    actionController(nextAction);
    //helloWorld(data.PARM1, data.PARM2);
    }
    }
    },
    failure: function(response){
    Ext.Msg.alert('Could not get startup values');
    }
    });
    }

  • #2
    I cannot see anywhere in your code where you are passing these parameters. Please post the relevant front-end code where you are passing them. Note: when posting code....wrap it in the
    Code:
    here is code
    tags.

    Comment


    • #3
      Ok, if you're putting the extra parms in as part of the option definition then they should be coming through with the code you have. Can you let us know what version of Valence you're running? Just log into the portal and click the About link in the upper right and you'll see the full version.
      Richard
      CNX Development Team
      richard.milone@cnxcorp.com

      Comment


      • #4
        Valence Web Application Framework

        Hi,

        It is version 2.1.20100409.0

        Comment

        Working...
        X