Solved

Datawindow w/ multiple retrieval arguments

Posted on 2008-10-07
2
476 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

Independent Software Vendors: 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ā€¦
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.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

737 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