NetTalk Central

Author Topic: Priming a related record with the parent id when child is on the parent browse  (Read 2492 times)

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
 I am trying to insert a record to a related table
Parent record has a unique field called DOC:DocumentID
 Child record has fields
 CHI:ChildID (unique auto numbered)
 CHI:DocumentID (relation to parent)
 CHI:Date
 CHI:Time
 CHI:Comment
If I Insert a record in the child table I prime the date and time as normal
in the advanced tab and in Example 21 I can see that the corresponding
relation variable is
primed with p_web.GetValue('Inv:ID')
However if I have the related child records on the same browse as the parent
record rather than on the parent update form no DOC:DocumentID value is
passed in the HTTP POST.
Which embed should I use in which I could set a session value when a new
parent record  is selected.  I would then set a session value
p_web.SetSessionValue('DocumentID')
--
Terry Davidson Windows XP Clarion Build 9056 ABC
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Rob Mikkelsen

  • Full Member
  • ***
  • Posts: 107
    • Yahoo Instant Messenger - flashpott
    • View Profile
    • Email
Have you tried (on the advanced tab, field priming), CHI:DocumentId=p_Web.GetSessionValue('CHI:DocumentId') because although the data is not sent directly to the form because it is not part of the single, unique, unchanging key, (so not available via GetValue) it should be written to the session queue.  If it is not, you can write it to the session queue at the start of the browse procedure for the child where that data is available.

Cheers!

Rob Mikkelsen