NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: rupertvz on July 17, 2024, 12:25:11 PM

Title: Passing Parameter to Child Browse from NWB
Post by: rupertvz on July 17, 2024, 12:25:11 PM
Hi Guys,

How do I pass a parameter from a NWB to a child browse?
Title: Re: Passing Parameter to Child Browse from NWB
Post by: Bruce on July 17, 2024, 08:09:34 PM
depends. What is the nature of the thing you are trying to pass?
Usually - in the general case - set a session value in the parent, and use it in the child.
Title: Re: Passing Parameter to Child Browse from NWB
Post by: rupertvz on July 17, 2024, 11:49:54 PM
Thank you Bruce,

it is a value from the record in the parent NWB.
I can add this field to the "view fields" of the NWB.
How do I pass this to a SessionValue?
Title: Re: Passing Parameter to Child Browse from NWB
Post by: rjolda on July 18, 2024, 02:34:02 AM
Rupert,
There are several places that the Browse and form do a file to session queue - this takes the record and fills up the Session Values. ( Generally, there is a session queue to file which updates the actual record if required.) The session value name will be the same as the field name.  So if you are looking at a value in FLD:Purchase date, look at p_web.GSV('FLD:Purchasedate').   Check - it may be already loaded in the browse for the highlighted record.  If it isn't, you can add some code to the Browse procedure "TakeEvent - 2 AfterRowClicked' and you can set a different value there to send to children.
Give it a try,
Ron