Help on DDDW retrieval based on key value

Help on DDDW retrieval based on key value

Post by Allan Do » Thu, 08 Jun 1995 04:00:00



I'm relatively new to Powerbuilder and can't figure out how to
modify/link the SELECT/WHERE clause of a drop down datawindow edit
mask to a "key" column on a data entry datawindow.  That is, I have
a data entry datawindow containing a "key" data column and a "code"
data column.  The code data column is a DDDW.  The DDDW is based on
a simple datawindow of

SELECT key, code, desc FROM codetable;

What I would like is to add a WHERE clause which specifies the "key"
to retrieve the code and desc for.  Ideally, the key would be linked
to the "key" column on the data entry datawindow.  Else I need to
update the WHERE clause each time the user changes it (is the
itemchanged event the appropriate place)?  

Am I even using the correct approach?

Thanks for you help in advance,
Allan Dong

 
 
 

Help on DDDW retrieval based on key value

Post by Craig Wagn » Thu, 08 Jun 1995 04:00:00


: SELECT key, code, desc FROM codetable;

: What I would like is to add a WHERE clause which specifies the "key"
: to retrieve the code and desc for.  Ideally, the key would be linked
: to the "key" column on the data entry datawindow.  Else I need to
: update the WHERE clause each time the user changes it (is the
: itemchanged event the appropriate place)?  

Create the datawindow with a retrieval argument and at run-time get a
handle to the dddw (using GetChild) and do a retrieve.
--

CPD Professional        | Fidonet:      1:134/238
Visual Systems          | Home: (403) 271-7387
Calgary, AB             | Work: (403) 262-9970

 
 
 

Help on DDDW retrieval based on key value

Post by Thomas A. Swengr » Fri, 09 Jun 1995 04:00:00


: I'm relatively new to Powerbuilder and can't figure out how to
: modify/link the SELECT/WHERE clause of a drop down datawindow edit
: mask to a "key" column on a data entry datawindow.  That is, I have
: a data entry datawindow containing a "key" data column and a "code"
: data column.  The code data column is a DDDW.  The DDDW is based on
: a simple datawindow of

: SELECT key, code, desc FROM codetable;

: What I would like is to add a WHERE clause which specifies the "key"
: to retrieve the code and desc for.  Ideally, the key would be linked
: to the "key" column on the data entry datawindow.  Else I need to
: update the WHERE clause each time the user changes it (is the
: itemchanged event the appropriate place)?  

: Am I even using the correct approach?

: Thanks for you help in advance,
: Allan Dong

Allan,
Get PB Faxline Document 2307 (its on the Infobase CD-ROM under
technical tips).  It shows you just what you need to know.
HTH,
Tom

 
 
 

1. Retrieval Argument in a DDDW

dddws are automatically retrieved when you execute retrieve for the
datawindow. This causes a retrieve argument dialog for dddws which
require parameters and don't have a row inserted into them prior to
the retrieve.

// To retreive yourself declare a variable:
datawindowchild dwc_dddw

dw_1.dw_getChild('column_name',dwc_dddw)
// Now retrieve...
dwc_dddw.Retrieve(Parm_1, Parm_2)

Regards,
Ray
and use  


2. 40 Mb Card Drive (8-bit XT-bus)

3. PowerMaker: Retrieval args to dddw?

4. automatic insertion of signature in inews

5. question: help with dddw displayed value

6. FS: Versatec 3424 Color Electrostatic

7. Disply Probs w/DDDW w/retrieval args

8. Vital LaserType Systems Owners

9. HELP: Getting display value in a dddw

10. Question about creating a hash of key-value pairs based on sub parameters.

11. Return a value based on values in two other columns.

12. 123 - How to color values in a column based on value

13. How to add value to variable based on certain value??