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

[HELPED]Optional Parameter issue in App Definition

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

  • [HELPED]Optional Parameter issue in App Definition

    I've set up an App in the Valence Portal called Manage Stock.

    I've added a parameter to pass to the back end program in the Optional Parameters column.

    When I go into the console and look at the Network calls no additional parameters are passed back.

    When I debug the RPG program the vvin_char retrieves an empty field.

    I can see a previous post had a similar issue in 2012.

    I've added the Optional Parameter with no parameters or spaces:
    parm1=manage

    optionalparams.jpg

    Am I doing something wrong or is there a bug with this process?

  • #2
    What version of Valence are you running?

    I just tested this with the latest 3.2 and the optional parameter is being passed. You should just be able to perform a vvIn on your parameter key name.

    Comment


    • #3
      We're on version 3.2.20130912.0

      I've enclosed the network request that we are sending through, it may help.

      network request.jpg

      Comment


      • #4
        Hi Stu,

        It's the back-end (VVCALL) that applies the optional parms to the buffer. As an experiment, in Portal Administration I just called up the "Load All Grid" app and added "test=hello" to the optional parms. Then in the EXGRIDALL RPG program I added a couple lines (in red):

        Code:
         /copy qcpylesrc,vvHspec                                         
        ** --------------------------------------------------------------
        **         Copyright (C) 2008-2012 CNX Corporation - NFA         
        ** --------------------------------------------------------------
        **     Object ID: EXGRIDALL                                      
        **       Version: V3.2                                           
        **   Description: Valence Examples - Grids - Load All            
        ** --------------------------------------------------------------
        **--------------------------------------------                   
        **  d specs                                                      
        **--------------------------------------------                   
         /copy qcpylesrc,vvDspec                                         
        d testChar        s             10a                              
        **--------------------------------------------                   
        **  program start                                                
        **--------------------------------------------                   
         /free                                                           
          testChar=vvIn_char('test');                                    
          vvOut.rootName = 'DEMOCMAST';                                  
          vvOut_execSqlToJson(vvOut:'select * from democmast');          
          *inlr=TRUE;                                                    
         /end-free
        When I ran this RPG program in debug the testChar field was properly populated with "hello".... So I'm not sure what to make of the issue you're having. I would suggest restarting your server instance. If it's still not working, try replicating my experiment above just to make sure it works. Then we can decide how best to proceed.

        Rob

        Comment


        • #5
          Thanks Rob,

          I'm not quite sure what I did wrong, but I tried your example - which worked.

          Went back and re keyed in the parameters and tried again on my app and it worked.

          Thanks for your help.

          Comment

          Working...
          X