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

NAB multi-button form

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

  • NAB multi-button form

    Is it possible to have a single RPG program based on EXNABBTN that would handle all buttons on the same form?

    In other words... within the program, determine which button was clicked and have separate procedures? (instead of having separate RPG programs for each button)

  • #2
    Hi Greg,

    Yes, we actually recommend that you have a single RPG program for all your buttons in the application and just pass a deferent action for each button call. So you will know what button was clicked based on the action that was passed.

    Thanks

    Comment


    • #3
      Awesome... I'm just not sure how to retrieve the "Action". I assume this is the "Action" referenced on the Call RPG Program/URL utility in behaviors.

      Just not sure how to retrieve the action inside the program.

      I found it in one of our own programs (duh). vvIn_char('action')
      Last edited by gwilburn; 05-06-2021, 01:28 PM.

      Comment


      • #4
        Define a work field to hold the cation value (ie: passed in fro mthe RPG CALL

        // Action is the "action" parm passed in from Valence
        // loaded with :: myAction = vvIn_char('action');
        dcl-s myAction char(30);

        Grab it like this:

        myAction = vvIn_char('action');

        and then do your subprocedure calls like this:

        // save the value of currentGroup to a session Variable
        if myaction = 'setSessVar';
        setSessVar();
        // If adding a Payee Code select AUTOMATIC value
        elseif myaction = 'addPayee';
        addPayee();
        etc etc

        Cheers!

        Comment


        • #5
          Nick... thanks for the reply... I had found that and updated my post.

          Freeky... I was searching for something unrelated in RPGLE and ended up on your page.. then I saw you had a video about Valence.

          Ten minutes later i get a notification about your reply.

          Are you spying on me?:D:D

          Comment

          Working...
          X