NetTalk Central

Author Topic: Send New Value To Server in a Memory Form  (Read 3952 times)

jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Send New Value To Server in a Memory Form
« on: January 28, 2008, 09:03:15 AM »
In a memory form that is dialog/setup procedure for a report I am trying to send a new value to the server for one of the variables that is displayed on the form.  I have the 'Send new value to server' option checked and have added the 'Server Code' to set a value based on the input of the current field.  I have done this on file forms and it works perfectly there.  Doing it in the memory table, I have added code that shows the value _is_ getting updated as a session value and in the value queue and when I _refresh_ the page the value is displayed.  Here is my server side code (with message statements that I capture via messagehook and view on a tab in my webserver window).

  MESSAGE('lToOrderNo: '                                  & lToOrderNo)
  MESSAGE('p_web.GetSessionValue(<39>lToOrderNo<39>): '   & p_web.GetSessionValue('lToOrderNo'))
  MESSAGE('lFromOrderNo: '                                &  lFromOrderNo)
  MESSAGE('p_web.GetSessionValue(<39>lFromOrderNo<39>): ' & p_web.GetSessionValue('lFromOrderNo'))
 
  IF lToOrderNo = 0
    lToOrderNo = lFromOrderNo
    p_web.SetValue('lToOrderNo',lFromOrderNo)
    p_web.SetSessionValue('lToOrderNo',lFromOrderNo)
  END ! if
 
  MESSAGE('lToOrderNo: '                                  & lToOrderNo)
  MESSAGE('p_web.GetSessionValue(<39>lToOrderNo<39>): '   & p_web.GetSessionValue('lToOrderNo'))
 
  DO Value::lFromOrderNo
  DO Value::lToOrderNo

What am I missing (or is there a bug here)?

Thanks,

John

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Send New Value To Server in a Memory Form
« Reply #1 on: January 31, 2008, 11:27:04 PM »
Hi John,

It seems to me that the error might be in the order numbers you are sending back.
The packet going back to the server needs to be valid xHTML. If all the "Messages" look right, then that's where I'd concentrate my attention.

So the big question,

What does an "order number" look like in your system. I'm guessing it's not 1,2,3,4 etc

Cheers
Bruce


jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Send New Value To Server in a Memory Form
« Reply #2 on: February 03, 2008, 06:56:47 AM »
Hi Bruce,

Thanks again for replying.  It is working now (and with the same code that is in my original message).  I had to add a reset field on lToOrderNo.  I just had the reset field on lFromOrderNo.  I also struggled with priming a checkbox so that it is checked when I enter the form.  I made sure the CurrentAction is Insert for this memory form and I set everything up in the template interface for priming the checkbox but it just would not display the check in the checkbox.  I found a solution by passing the checkbox value on the command line and that worked perfectly.

John