main logo
Subject: Re: passing parameter ?
Author: Mike Devlin
Posted: 2001/11/05 11:24:33
 
View Entire Thread
New Search


<i><font color="#663300"><i><font color="#663300">I need to pass a parameter from a Parent to a Grandchild. The middle parent/child knows the parameter but even though I list it, doesn't seem to pass it on?

This is what is happening: 3 modal forms call each other, and populate separate listboxes with SQL statements the 1st Parent passes 2 parameters, lcdistrict and lcdistrictid to the Middle Child/Parent. Then I try to pass 4 parameters (lcdistrict, lcdistrictid, lccontact, lccontactid) to the Grandchild and come up with a Logical .F., .F., lccontact, lccontactid
when I watch it. What do I need to tell the middle layer and/or the Grandchild to make this work. I am not using Bizobjects on these forms, just SQL with WHERE statements. I want the lcdistrict name to appear on each form (not working on Grandchild only)

Thanks!

Lynette</font></i>

I finally figured this out!!! I thought I'd share my answer for anyone else stumbling around like I have been! Finally, the lightbulb is getting some electricity! The answer is in Geof's one-to-many example. Make sure your BizObj has the property you are passing between forms. (and if you use a modal lookup in between, add the property to the modal form so you don't stop the property from being passed down!)

This just fell in place yesterday for me and SO MUCH starting WORKING.

I use a lookup and a CRUD form for each level of my one to many relationships... it's a drill down thing. (and next is the combined lookup that holds all the relationships on one form --- but first things first)

In order to get this to work (always knowing the name identifier of the highest level parent on the form for each level of child and their names as well) I needed to pass the Key Field and Name Field from Parent to child to grandchild and so on... the key was making sure I added properties to each bizobj and calling them, PKeyFld, PNameFld, C1KeyFld, C1NameFld, C2KeyFld, C2NameFld --- this works. may not be the best way, but it worked for me. the parent has the first 2 properties, the first child has 4 properties and the grandchild Biz Obj has all 6 properties added. As Geof said, since these are added to the Biz Obj, I never need to resolve errors because I forgot to add them to a form. They will be available whenever I use the bizobj's for that relationship!

my key was adding the properties to the modal lookup forms (not the bizobj's as I used SQL on the lookups) This way, when a form called a child lookup, the chain of passing properties wasn't broken by the lookup!

Hopefully that makes sense.


</font></i>

Just to make the calls easier, I usually put the value to be passed again into a form property, this way I can just reference it using ThisForm., instead of going all the way to the bizobj to get the value. Just a few keystrokes saved though.
Devman
mdevlin /at/ ajdebruin .D.OT com

 
©2001 Mike Devlin
<-- Prior Message New Search Next Message -->