Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Conditional AutoPrompt
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Conditional AutoPrompt
 Login/Join
 
Platinum Member
posted
I have searched on this topic and found very little info. Trying to see if we can conditionally "Prompt the user" or "Run with Defaults" I tried this link and wasn't successful
http://forums.informationbuild...957043096#6957043096

This is the simplest requirement that I have. Please advise.

  
-DEFAULTH &FLG='Y';
-IF &FLG EQ 'N' THEN GOTO SKIP_IT;
-DEFAULT &PARM1=’VALUE1’;
-TYPE PROMPT for parms here
-SKIP_IT
-TYPE run with defaults here
-DEFAULTH &PARM1 = ‘VALUE2’;

This message has been edited. Last edited by: FP Mod Chuck,


-********************
Sandbox: 8205
Dev: 8201M
Prod:8009
-********************
 
Posts: 216 | Location: Houston,TX | Registered: June 11, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
What's the condition that'll determine your decision?


WebFOCUS 8206, Unix, Windows
 
Posts: 1659 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
I believe our user wants to use the same procedure as Adhoc versus scheduled job Via ReportCaster. When its scheduled we need it to run with defaults and when we launch it adhoc, we expect to pass some parms.
Thanks in advance.

This message has been edited. Last edited by: vaayu,
 
Posts: 216 | Location: Houston,TX | Registered: June 11, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You should probably try -DEFAULT instead of -DEFAULTH.


WebFOCUS 8206, Unix, Windows
 
Posts: 1659 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
BabakNYC,
The requirement is to enable/disable prompt based on a flag so thats why I have a DEFAULT in one place and DEFAULTH in another place. We want to control the prompting based on a flag. Hope it makes sense


-********************
Sandbox: 8205
Dev: 8201M
Prod:8009
-********************
 
Posts: 216 | Location: Houston,TX | Registered: June 11, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Your problem is with autoprompt. It isn't smart enough to follow conditional expressions.

In this case, it sees the -DEFAULT before it sees the -DEFAULTH, so it prompts for a value.

That suggests that you could invert your condition, putting the -DEFAULTH inside it and skipping to the -DEFAULT otherwises, but that won't work either; autoprompt will then see -DEFAULTH before -DEFAULT and never prompt.

What would work is to put both conditional sides into a separate file each and include the remainder of your procedure after that. Then, in the case that the user runs the truth-side procedure, she gets a prompt, and if she runs the falsehood-side procedure, she won't.

-* report_prompted.fex
-DEFAULT &PARM1 = 'VALUE1';
-INCLUDE report.fex


-* report_unprompted.fex
-DEFAULTH &PARM1 = 'VALUE1';
-INCLUDE report.fex


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1643 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Conditional AutoPrompt

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.