NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: LSlowick on September 05, 2013, 06:25:19 PM

Title: Filter not working on child browse
Post by: LSlowick on September 05, 2013, 06:25:19 PM
Hi

I have a parent browse 'SampleBook' on file SBBBM using primary key SBB2:K_ .
I have a child browse 'SampleBC' on file SBBBK using primary key SBB:K_ .

On the parent browse one of the fields is SBB2:Book_ID and I'm trying to use that field in the
conditional filter of the child browse as follows:

'SBB:BOOK_ID = <39>' & p_web.GSV('SBB2:BOOK_ID') & '<39>'

Looking at the debug trace of the filter I'm not getting any value for SBB2:BOOK_ID in the child.

Question:

1) Are the columns in the parent browse row not available in the child by using GSV?
2) Is only the parent key/field values passed to the child?
3) In the child how can I access or get the values from the selected parent row?

PS.. I changed my filter in the child browse to use the parent key/field and it now work. But I'd still like to know for future reference / use the answers to my questions above.

Thanks for any help.
Lee
Title: Re: Filter not working on child browse
Post by: bshields on September 05, 2013, 06:54:06 PM
Hi Lee,

By default you can count on at least the primary key field being available. Before setting the filter i find it best to get the whole record of the parent file (or files i may need to set the filter)

Regards
Bill
Title: Re: Filter not working on child browse
Post by: Stu on September 05, 2013, 08:41:51 PM
Hi Lee,

You could _trace on the parent browse click, see what's going on there.

Also, if in a pinch, it's a good idea to try and replicate in one of the nettalk examples. The Accounts eg has parent/child browses (i think).
Title: Re: Filter not working on child browse
Post by: Bruce on September 05, 2013, 09:48:37 PM
>> 1) Are the columns in the parent browse row not available in the child by using GSV?

correct. The columns are not available. Only the "Unique key" fields (as set on the browse) are available. If you need other fields in that record you need to load the record yourself (in the callee not the caller) and do a
p_web.FileToSessionqueue(customers)

>> 2) Is only the parent key/field values passed to the child?

yes. (or more accurately, the parent key field values are set in the session queue for use by the child.)

>> 3) In the child how can I access or get the values from the selected parent row?

other than the key fields? Open the table, and read the record.

Cheers
Bruce
Title: Re: Filter not working on child browse
Post by: LSlowick on September 06, 2013, 05:27:20 AM
To all,

Thanks, it's now much clearer!

I just takes a while to put all the pieces together to understand what can or can't be used.

Lee