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

Form Helper setValue only works under debug

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

  • Form Helper setValue only works under debug

    Hello,
    I have an editgrid which has a custom form for when a record is added or changed. The form is not set to autoload and has a helper program.. Inside the Process procedure for the helper program, if gMode = 'formRender' it runs "lDate = %char(%Date():*ISO)" & "setValue('GNNTDT' :lDate)" to a field(GNNTDT) on the form. If I STRDBG on the helper program, the values for date are updated to the current date. If debug isn't running, the date field remains empty. I added a loop to the program to delay the procedure to rule out timing issues, but if debug wasn't running, the date field was blank. Why would STRDBG make the helper program work?

  • #2
    Without debugging, open up the NAB Developer Console and view the Network traffic for this helper program call. Can you tell me what the response is?

    Comment


    • #3
      Hi Sean,
      The response is showing the fields from the form with all of the values in place. The form is not showing the values from the response. I did the same test with STRDBG active and the response was the same, but now all of the values in the form are showing the same as the response data.
      Thanks,
      Bruce

      Comment


      • #4
        Sounds like a timing issue is at play. Are you attempting to change the field value of an existing record or only when you are adding a new record?

        Comment


        • #5
          The form is setup for adding a note. If record is new, user adds note type and text, helper program inserts the date, time and user id. If existing record is changed, I wanted program to update the date, time and user id again. So, the helper program updates fields on adds and changes. I tried adding a Do loop to delay the execution of the Process procedure in the helper program, but, it didn't make a difference. I don't know if this is relevant but the gMode is formRender.

          Comment


          • #6
            Please reach out to support@cnxcorp.com to schedule an online meeting so we can take a closer look.

            Comment

            Working...
            X