cancel
Showing results for 
Search instead for 
Did you mean: 

How to link datawindow to another datawindow

Former Member
0 Kudos

Hi All,

With PB 12.5 here.

I have a datawindow called d_locationpath, which is to query and combine parent and child location to get the location path (full directory), as below.

Fyi, I can't get this Location Path directly from database and that's why I create this datawindow to get it.

My question, how to link another datawindow to this d_locationpath datawindow to get Location Path based on Locationid?

Example:

d_stockitem has locationid and I would like to use this locationid to get Location Path in d_locationpath (where d_stockitem.locationid = d_locationpath.locationid).

Kindly advise.

Thank you in advance.

BR,

Yow

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Yow,

If you are using the PFC, you could use the linkage service.

If not, you could make d_stockItem accept locationID as an argument and do something like this...

d_locationID.RetrieveEnd():

   IF rowCount() = 0 THEN d_stockItem.Reset()

d_locationID.RowFocusChanged():

   IF currentRow > 0 THEN

      d_stockItem.Retrieve(getItemNumber(currentRow, 'locationID'))

   END IF

That should get you started.

Former Member
0 Kudos

I wounder why you can't combine result the same in Query. Anyway  you can't retrieve the result set as you set using the datawindow.

You must be combine this in Query. From your post i understand the table should have parent and child relationship.

Thanks,

Balu

Answers (1)

Answers (1)

Former Member
0 Kudos

Maybe you are after a drop down datawindow.

  1. In the d_stockitem datawindow,
  2. select the locationid column,
  3. go to the Edit tab in properties for locationid, then
  4. choose dropdowndatawindow as edit type
  5. scroll down
  6. check verticalscrollbar if the user will actually be choosing location this way
  7. scroll further down
  8. in dataobject browse and choose d_locationd dataobject, ok
  9. for display column you can choose location_path
  10. for data column you must choose locationid (This is your linkage if you like)