Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter dropdown datawindows

Status
Not open for further replies.

ersarg

Programmer
Feb 7, 2006
8
0
0
US
I need to filter a dropdown datawindow based on the content of another field. In PB 7 I setup retrieval arguments and blocked the retrieval argument dialog box from appearing by selecting in the DataWindow Painter ROWS then DATA then INSERT. In PB the DATA option is no longer there. Does anyone have the process for filtering drop down datawindows in PB10?
 
hi
you may can:
1\set the dddw's dataobject no argument first ;
2\in the window's open event ,retrieve the dddw;
3\in the dw's rowchanged event ,get the value by using getitemxxx,and then filter the dddw by this value.
 
Please lead me I can't figgure this one out. Say within the current row in DW_1 field APP contains the value to be used to filter the dropdown data window for the field SCR what is the syntax for each of your steps?

1\set the dddw's dataobject no argument first ;
I'm assuming this means no "Retrieval Argument's" in the design of the DDDW?

2\in the window's open event ,retrieve the dddw;
Currently I never "retrieve" the DDDW, I retrieve the data window that it is a child to, is this what you refer to?

3\in the dw's rowchanged event ,get the value by using getitemxxx,and then filter the dddw by this value.
How do I filter the DDDW? I assume with some variation of:
DW_1.OBJECT........
I tried several but all error at run time
 
in the datawindow's event itemchanged|rowfocuschanged,
Code:
datawindowchild ldwc_SCR
String ls_APP
IF dw_1.getchild('SCR',ldwc_SCR) = 1 THEN 
  ls_APP = dw_1.getitemstring(dw_1.getrow(),'APP')
  IF ISNULL(ls_App) THEN ls_App = ''
  IF Trim(ls_App) <> '' THEN
    ls_Filter = ...//builder filter expression using ls_APP
  ELSE
    ls_Filter = ''
  END IF 
  ldwc_SCR.setFilter(ls_Filter)
  ldwc_SCR.Filter()
END IF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top