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

GetFormChar Producing Errors For Disabled Fields

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

  • GetFormChar Producing Errors For Disabled Fields

    Recently, I found that when a checkbox field on a form widget is disabled and the GetFormChar procedure is called on that field, an error is produced in the Valence CNX Errors page.

    Specifically, this error originates in the VVNABTMPL module and in the GetSelectionChar procedure.

    Here is the error id:
    VV00070 - An error occurred when attempting to retrieve a value for {field name}

    Here is the help text:
    Verify what value (if any) was posted for this field.

    There is a valid value for this field. The field is just disabled. Our intention with the RPG program that produces this error is to retrieve all of the form inputs at the beginning of the program and only deal with that field if it is enabled. As of now, this implementation often produces the error above.

  • #2
    I assume that you are never "loading" any data for your form, correct? In other words, your form is initially blank and the user may or may not fill out fields within it?

    Comment


    • #3
      Yes, my form is initially blank and the user may or may not fill out fields within it.

      Comment


      • #4
        Sorry for the late response on this. Can you tell me what version of Valence you are running? Also, I assume that your program is based off of the EXNABBTN template, correct?

        Comment


        • #5
          0912.1

          Anthony is one of the guys on my team

          The issue comes from this pop-up

          2022-12-05 11_34_57-SPACE - DEV.png

          If the PRINT checkbox is unchecked (i.e. the user just wants to email the output), I end up with with tons and tons of these messages in VVERRLOG:


          Error Id#........... VVID 45597
          Program In Error... VVPGM DPRRPTRTSB
          Module In Error. VVMODULE VVNABTMPL
          Procedure In Error VVPROC GetSelectionChar

          Message ID....... VVMSGID VV00070
          Message Severity VVMSGSEV
          Statement In Error VVSTMT
          Message Text.... VVMSGTXT An error occurred when attempting to retrieve a value for "SAVEYN".

          Help Text....... VVHLPTXT Verify what value (if any) was posted for this field.

          It's only with SAVEYN and HOLDYN, the two checkboxes. The RPG, which is indeed based on NAB button helper template, is getting all the values from the form

          emailSelected = GetFormChar('EMAILSELECTED');
          emailUser = GetFormChar('EMAILUSER');
          outqSelected = GetFormChar('OUTQSELECTED');
          outq = GetFormChar('OUTQ');
          holdYN = GetFormChar('HOLDYN');
          saveYN = GetFormChar('SAVEYN');
          duplex = GetFormChar('DUPLEX');
          copies = GetFormNum('COPIES');
          drawer = GetFormNum('DRAWER');

          whether it needs them or not. And in this case since the user wants to email we don't need drawer and duplex and hold and save and all that jazz since that print checkbox, and thus all the stuff that applies to "print" is unchecked. And I could change the program to condition doing all those Getformchars on OUTQYN being Y which would arguably more efficient as well because why are we getting all that stuff from the form if we don't need it, but my point to him was that, in my opinion, (1) we should be able to getformchar anything on the form without getting all that racket in VVERRLOG (98% of my VVERRLOG records are got these 2 errors which just creates a lot of noise), and (2) it has no beef with the other fields, only the checkboxes. The checkboxes are still checked but clearly it's unhappy with them not being active/enabled.

          It's not a big deal, LOW PRIORITY, I just wanted to bring it to your guys' attention. If we have to condition those GetFormChars in that RPG, we can do that. Right now we're just grabbing everything up front and then decide what to do based on what was selected...

          -gadget

          Comment


          • #6
            Thanks for the detailed explanation...we will see what we can do about this.

            Comment

            Working...
            X