Solved

Datawindow w/ multiple retrieval arguments

Posted on 2008-10-07
2
475 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
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 keystrokes in Netbeans IDE 8.0 for Windows.

756 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