NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: sukhendu on March 28, 2012, 09:51:37 AM

Title: Browse Parent-Child help
Post by: sukhendu on March 28, 2012, 09:51:37 AM
Following example 28, I have added a button on the parent (customer) browse row.  On button click I have added a child (order) browse procedure. 

On the child browse procedure's default filter: range limit filed is ParentSysId, Range Limit Type: Table Relationship and related table is Parent (Customer).  The filter is not working.  All child records are displayed no matter which parent is selected.

This is simple parent child - but I cannot seem to set the filter correctly.  Any help is appreciated.

Sukhendu 

Title: Re: Browse Parent-Child help
Post by: kevin plummer on March 28, 2012, 04:46:39 PM
Try just using a normal filter

eg 'child:ParentSysId = ' & p_web.gsv('Parent:ID') !where Parent:ID is the unique identifier on the parent table

Filters can be tricky so if you are having trouble code the filter in the embed and add a trace so you can see the value.
Title: Re: Browse Parent-Child help
Post by: Rob de Jager on March 29, 2012, 01:36:43 AM
The "final" filter is set in loc:filterwas.
You can see this in the Start of "After SetView" embed in debugview if you put this code there : p_web._trace(Current filter = '  & loc:filterwas)

Cheers

Rob

Title: Re: Browse Parent-Child help
Post by: sukhendu on March 30, 2012, 11:52:23 AM
Thank you Kevin and Rob.  Child filter is working now - Sukhendu