Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Datawindow w/ multiple retrieval arguments

Posted on 2008-10-07
2
Medium Priority
?
484 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 1480 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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. …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

598 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