NetTalk Central

Author Topic: Form field priming problem  (Read 3251 times)

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Form field priming problem
« 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]
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Form field priming problem
« Reply #1 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

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Form field priming problem
« Reply #2 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.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Form field priming problem
« Reply #3 on: November 17, 2011, 09:03:45 PM »
Although now I look at the template generated field prime that what you do.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Form field priming problem
« Reply #4 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