Windows7Ultimate 64bit Clarion63_9056 NT545
When I INSERT a new Parent
In my parent form I have a selection from a product list
On the same form I have a browse of insured items
Once I have selected a product I select insert on the insured item browse
Based on the productID selected in the parent I want to hide certain fields in the insured items form.
The problem seems to be that at this point the parent record has not been written to the table so if I prime the child with INS:ProductID = APP:ProductID the value is zero
I tried this
ACCESS:Application.Open()
ACCESS:Application.UseFile()
APP:ApplicationID = INS:ApplicationID
ACCESS:Application.FETCH(APP:PK_ApplicationID)
INS:ProductID = APP:ProductID
p_web.SetSessionValue('INS:ProductID',INS:ProductID)
ACCESS:Application.Close()
in preinsert end with no luck (because there was nothing written to the table yet)
I then tried adding
adding
p_web.SSV('NewProductCode',p_web.GSV('APP:ProductID'))
p_web._trace('application_form newpeoductcodevalue ' & p_web.gsv('NewProductCode'))
to the server code of the parent productid selection but the trace value is blank
had this worked I would then have put this code in the preinsert end embed of the child
IF p_web.GSV('INS:ProductID') = 0
INS:ProductID = p_web.GSV('NewProductCode')
p_web.SSV('INS:ProductID',INS:ProductID)
p_web._trace('insureditem_form productid cannot be zero ' & p_web.GSV('INS:ProductCode'))
END
What should I try to have the productID available to me within the child form?