NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: terryd on November 17, 2011, 05:14:31 AM

Title: Form field priming problem
Post by: terryd on November 17, 2011, 05:14:31 AM
Windows7 Ultimate 64bit
Clarion8.0.8778
Nettalk 5.40
Can anyone advise why this doesn't work
I am adding a record as a child of another record
In q1a.png I have primed the variable ITEPRC:ItemID with p_web.GSV('ite:itemID')  !key of the parent
In pre insert after primes I open the parent table and read the parent record
I then want to set the value of the iteprc:brandid to equal the parent ite:brand value
before the close I have a trace, the result of which is shown in q1b.png in line 1 iteprc:brand 12 which is correct
However on the form (behind) the brand value is not displayed



[attachment deleted by admin]
Title: Re: Form field priming problem
Post by: Bruce on November 17, 2011, 08:05:07 AM
you're setting the Session Value of iteprc:brandid - and that's a Good Thing.
Try setting plain iteprc:brandid as well though and see if that helps.

cheers
Bruce
Title: Re: Form field priming problem
Post by: terryd on November 17, 2011, 09:02:12 PM
Yes that did it!
Is there a reason? I have been pretty scrupulous in using session variables instead on local/data variables in Nettalk. It seems strange that in this instance I need the data variable and the session variable set for the value to appear.
Title: Re: Form field priming problem
Post by: terryd on November 17, 2011, 09:03:45 PM
Although now I look at the template generated field prime that what you do.
Title: Re: Form field priming problem
Post by: Bruce on November 18, 2011, 09:43:09 PM
During the form startup it obviously loads the file record, and at some later point moves the file record into the session queue. Should you happen to do stuff before it moves the file record to the session queue, then you need to prime the file field as well.

I know it's not completely elegant, but that's the reason for it.

cheers
Bruce