Populating a column with a dropdown datawindow within a datawindow.

I have a datawindow which contains two fields.  One is named "customer_name"
and the other is "job_siteno".
these fields are contained in two different tables which are related by a
foreign key column "cust_id". Both of these columns have a DDDW edit
control.  When I select the customer name I want to then have the
"job_siteno" column populated with all the site numbers related to this
particular customer. I would then be able to select the site number from the
DDDW edit control. Selecting the customer number is no problem.  My problem
is that the site numbers won't populate correctly unless I enter a value in
the retrieval argument window.
Also, i don't want the retrieval argument window to appear during run time.
Any help would be appreciated.
Thanks,
Sheldon Thompson

0
Sheldon
9/3/1999 4:33:11 AM
📁 sybase.powerbuilder.datawindow
📃 28057 articles.
⭐ 5 followers.

💬 3 Replies
👁️‍🗨️ 1561 Views


1. You need to get the reference to the DDDW using the getchild() function.
2. Using the DataWindowChild, insert a row in the child datawindow. This
will overcome the retrieval argument     runtime window appearing.
3. When entering new record, get the data value of the "customer _name"
(most probably cust_id) column and pass it as the retrieval argument to the
DataWindowChild and retrieve the DataWindowChild. This will show you records
in job_siteno column, related to customer_name.
Thanks
Devang Shah
Mumbai, India
Sheldon Thompson <Shellt1000@cs.com> wrote in message
news:#3VFZYc9#GA.242@forums.sybase.com...
> I have a datawindow which contains two fields.  One is named
"customer_name"
> and the other is "job_siteno".
> these fields are contained in two different tables which are related by a
> foreign key column "cust_id". Both of these columns have a DDDW edit
> control.  When I select the customer name I want to then have the
> "job_siteno" column populated with all the site numbers related to this
> particular customer. I would then be able to select the site number from
the
> DDDW edit control. Selecting the customer number is no problem.  My
problem
> is that the site numbers won't populate correctly unless I enter a value
in
> the retrieval argument window.
> Also, i don't want the retrieval argument window to appear during run
time.
> Any help would be appreciated.
>
> Thanks,
> Sheldon Thompson
>
>

0
Devang
9/3/1999 6:01:04 AM
Sheldon
if you found difficult in passing argument to ddw. i suggest you modify the
select statement of the ddw. you can use (getsqlselect() and setsqlselect()
function).
Sheldon Thompson wrote:
> I have a datawindow which contains two fields.  One is named "customer_name"
> and the other is "job_siteno".
> these fields are contained in two different tables which are related by a
> foreign key column "cust_id". Both of these columns have a DDDW edit
> control.  When I select the customer name I want to then have the
> "job_siteno" column populated with all the site numbers related to this
> particular customer. I would then be able to select the site number from the
> DDDW edit control. Selecting the customer number is no problem.  My problem
> is that the site numbers won't populate correctly unless I enter a value in
> the retrieval argument window.
> Also, i don't want the retrieval argument window to appear during run time.
> Any help would be appreciated.
>
> Thanks,
> Sheldon Thompson
0
edward
10/11/1999 2:33:05 PM
On Mon, 11 Oct 1999 22:33:05 +0800,
 in powersoft.public.powerbuilder.datawindow
edward <ed130088@netvigator.com> wrote: 
>Sheldon
>if you found difficult in passing argument to ddw. i suggest you modify the
>select statement of the ddw. you can use (getsqlselect() and setsqlselect()
>function).
>
>Sheldon Thompson wrote:
>
>> I have a datawindow which contains two fields.  One is named "customer_name"
>> and the other is "job_siteno".
>> these fields are contained in two different tables which are related by a
>> foreign key column "cust_id". Both of these columns have a DDDW edit
>> control.  When I select the customer name I want to then have the
>> "job_siteno" column populated with all the site numbers related to this
>> particular customer. I would then be able to select the site number from the
>> DDDW edit control. Selecting the customer number is no problem.  My problem
>> is that the site numbers won't populate correctly unless I enter a value in
>> the retrieval argument window.
>> Also, i don't want the retrieval argument window to appear during run time.
>> Any help would be appreciated.
>>
>> Thanks,
>> Sheldon Thompson
>
Sheldon if you want to populate the field with the value use setitem function
and set value for the column you need but    
 you using retr arg it is not going to populate at run time for the users. But
also you can use getsqlselect() and setsqlselect() 
0
olga
10/11/1999 2:44:34 PM
Reply: