NetTalk Central

Author Topic: Child Browse, multi part key  (Read 3374 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Child Browse, multi part key
« on: December 06, 2012, 08:30:29 AM »
     I have a form with a tab.  The tab contains the parent and child browse side by side.  The key linking the two files contains two fields, ID_NO and Course_No.  I cannot get the child browse to update when a row is selected in the parent.  The parent has a filter defined that works as expected.  The child is set up to use the Course_no field with a relationship to the parent table.  I suspect there is an issue with the multi-part key not being set properly.
     I have looked at example web25 and it uses a conditional filter I don't understand.  I tried to duplicate this in my app but had no success.
     I also tried setting normal variables and session variables in the User clicked on row in browse embed, but still no good.
     I would have thought the templates would take care of all this once a browse procedure was set as a child.  Any thoughts?

Thanks,

Jeff King
« Last Edit: December 06, 2012, 08:33:05 AM by kingja »

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Child Browse, multi part key
« Reply #1 on: December 06, 2012, 02:02:18 PM »
Personally I just use filters. So in your child browse add the filter but in code not the template. Add a debug trace before you set the filter to see what the session value of Course_No from the parent file to determine if in fact it is not set. It's also a good idea to turn on sending the filter to debugview as well which should give you clues on what is going on.

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Child Browse, multi part key
« Reply #2 on: December 06, 2012, 05:24:58 PM »
Kevin,

     I'm reading about debugview in Bruce's Nettalk book and will try that as soon as I get up to speed.  In the meantime, I am using the following filter on the child browse:

'Age:ID_NO = ' & p_web.GSV('Cou:ID_NO') & ' AND  Age:COURSE = <39>' & p_web.GSV('Cou:COURSE') & '<39>'

If I select an item in the parent browse, nothing is updated in the child browse.  However, If I select change to view an item, then immediately close the called form, when I return the child browse has been updated and displays the correct filtered data.  Thus, I believe my filter above is correct, but session variables do not get updated unless I open a form.  It is just not "fired" as rows are selected in the parent browse.  This seems odd since I have a similar parent/child set of browse procedures on another set of tps files which works as expected.

Thanks,

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Child Browse, multi part key
« Reply #3 on: December 06, 2012, 10:43:10 PM »
Hi Jeff,

an example app would be useful to comment specifically.

cheers
Bruce

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Child Browse, multi part key
« Reply #4 on: December 07, 2012, 09:45:43 AM »
Bruce,

     OK...will send by private email.

Thanks,

Jeff