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

vvIn_char on a form widget pulling in default value instead of data source value

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

  • vvIn_char on a form widget pulling in default value instead of data source value

    I have a weird bug that I'm working with that I can't figure out why it's happening besides maybe a timing issue.
    I have a remote database setup in NAB. I built a form widget with this data source.
    In my app, there is a grid widget that has a column button. When the user clicks this button, the app hides that grid and filters(and AutoShow) the form widget. What the user sees in this form widget is correct data, exactly what I'm expecting.
    I also have a form helper that runs when the form is created. The first time this RPG program runs, the gMode is form render which is expected. However, when I use the vvIn_char to pull one of the values from the form, I get the default value in that datsource. It's like the filter hasn't been run yet.
    I have a back button the user can press. This hides the form, goes back to the grid, and repeat. Click the button, which hides the grid and shows the form, gMode is now form show and vvIn_char returns the value I see in the form.
    Does this make sense? I don't think I have seen this issue with datasources that are built with files on the i so I'm wondering if it has to do with the remote data base.
    Any ideas on what I can do to resolve the problem?
    Thanks.

  • #2
    I wanted to do another test real quick. I set up a new form widget with a datasource that is not a remote database and I was able to replicate the results. The form helper is run on form render and vvIn_char returns the default value, not the filtered value even though the filtered values are shown on screen.

    Comment


    • #3
      You should be using the 'Show' to get the values from the form that are populated on the load of the data source; gMode equals 'formShow'

      Screenshot 2023-11-16 at 12.13.04 PM.png

      Comment


      • #4
        I just tried to change the helper program to be kicked off by form show and I'm getting the same results. Here is the widget. I uploaded a picture of the widget and RDi in debug mode. The values are not the same.
        Attached Files

        Comment


        • #5
          Is your form widget set to Autoload data? If so, you may want to turn this off and try again.

          Comment


          • #6
            What I can do is fire an event from the form helper, that calls an RPG program that can then pull in the correct value. That is why it seems like a timing issue.

            Comment


            • #7
              Did turning off autoload have no effect?

              Comment


              • #8
                Hello Sean,
                Unfortunately, no, turning off autoload did not help. What that did is when the form helper runs and executes vvIn_char, the value returned is blank. The value shown in the widget on the screen is correct still.

                Comment


                • #9
                  OK, thanks. We will attempt to replicate this on our system and then come up with a fix.

                  Comment


                  • #10
                    This will be fixed in the upcoming update.

                    Comment

                    Working...
                    X