tags:

views:

254

answers:

1

Hi, I have a datawindow(let its name be parent), in which I am displaying another datawindow(let us call it the child) as a drop down list. The parent takes two retrieval argument, named org_id and pccc_id. The child takes one retrieval argument named org_id, which should have the same value as the parent's org_id. Now I want to link these two retrieval arguments.

How can I do that ?

+1  A: 

Firstly, I'd like confirm you are implementing the relationship using what's called a drop down datawindow (often referred to as a dddw)? Dddw's are very common in PB, so it should not be hard to find examples in the online help or elsewhere.

If you're in fact already doing it via dddw's, then I'm assuming the dddw represents a column in the result set of the parent datawindow? In the window, you can code for retrieval of the dddw. This is how it's done in many applications, sometimes in the window's initialization events or the parent datawindow control's events.

In many cases, the dddw is displaying code table data and doesn't require arguments, and can be set to autoretrieve in its properties. If the datawindow behind the dddw requires an argument, look up datawindowchild in the help files. You can manipulate the dddw's underlying dw once you have a handle to it. Check out the help files for method getChild().

Bernard Dy
To add, you need to make sure you do the Retrieve() on the DataWindowChild (the handle you'll get from GetChild()) *before* the Retrieve() on the parent. Just pass the same org_id to the Retrieve() of the dwc as you would the parent.
Terry