?
Solved

Datawindow w/ multiple retrieval arguments

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

801 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