NetTalk Central

Author Topic: Passing Parameter to Child Browse from NWB  (Read 3227 times)

rupertvz

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
    • Email
Passing Parameter to Child Browse from NWB
« on: July 17, 2024, 12:25:11 PM »
Hi Guys,

How do I pass a parameter from a NWB to a child browse?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11245
    • View Profile
Re: Passing Parameter to Child Browse from NWB
« Reply #1 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.

rupertvz

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
    • Email
Re: Passing Parameter to Child Browse from NWB
« Reply #2 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?

rjolda

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
    • Email
Re: Passing Parameter to Child Browse from NWB
« Reply #3 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