Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Prompt in Impromptu 1

Status
Not open for further replies.

swen17

Programmer
Jan 15, 2004
10
0
0
US
Hi,

I have a report with two prompts, if the user inputs something in the first prompt I don't want the second prompt to be used in the fitler (this second prompt has default values). If there's no input in the first prompt I want the default values in the second prompt to be used in the filter. FYI..I'm using Impromptu Series 7 version 2, with an Oracle database. Thanks in advance for any and all advice.

Swen...
 
See this faq401-2137 written by Dave Griffin.

I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
Double D,

Thanks for the response, I appreciate it, I should have found that FAQ in the first place. I don't quite understand how to implement this.
For example with this filter:

Event Date between ?\Prompts\Starting Date? and
?\Prompts\Ending Date? and Fleet starts with
?Prompts\Fleet? and 1 = decode[?\Prompts\Fleet?,'NULL',1,0] and PARTNUM starts with ?\Prompts\Part Number?

If Fleet is 'NULL' then 1 = 1 and the rest of the filter (PARTNUM) would be executed. Whereas if it's not null then 1 = 0 and rest of the filter would be executed???? Is that how it's supposed to work??? I'm missing something....

Thanks!
Swen




 
I would probably write it as follows:

Event Date between ?\Prompts\Starting Date? and
?\Prompts\Ending Date? and
(1 = Decode(IfNull-String(?\Prompts\Fleet?,'NULL'),'NULL',0,1) AND (Fleet starts with ?Prompts\Fleet?)) OR
(0 = Decode(IfNull-String(?\Prompts\Fleet?,'NULL'),'NULL',0,1) AND (PARTNUM starts with ?\Prompts\Part Number?))


I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
Thanks DoubleD...that worked perfectly. It's great to be able to do that with prompts...will be using this alot. Thank you so much!!!!

Swen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top