Solved

Datawindow w/ multiple retrieval arguments

Posted on 2008-10-07
2
468 Views
Last Modified: 2013-12-26
Hi,
Using PB10.5

I have a datawindow on a window that has 1 retrieval argument "department". The department is selected from a dropdownlistbox and this event fills the datawindow.  I would like to give the user an option to fill the datawindow based on a different retrieval argument "name".  So If the user selects a department then the datawindow fills where the department = :dept, and If the user enters a name in a textbox then the datawindow fills where name = :name.  
Is there a way to accomplish this?

thx,
Dave
0
Comment
Question by:coperations07
2 Comments
 
LVL 14

Accepted Solution

by:
sandeep_patel earned 370 total points
ID: 22663822
as per your example, give two arguments in design time and change your where clause like this...

where ( department = :arg1 or :arg1 = 'all')
and (name = :arg2 or :arg2 = 'all' )

Now based on condition possible arguments to your datawindow can be..

dw_1.retrieve('SALES', 'all')....for dept 'SALES'  & all managers
dw_1.retrieve('SALES', 'JAMES')....for dept 'SALES' dept & manager JAMES
dw_1.retrieve('all', 'JAMES')....for all depts & manager JAMES
dw_1.retrieve('all', 'all')....for all dept & all managers

Regards,
Sandeep
0
 

Author Comment

by:coperations07
ID: 22669384
Excellent sandeep! That's exactly what I needed.

thx,
Dave
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now