Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


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

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Conditional AutoPrompt
 Login/Join
 
Guru
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: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Virtuoso
posted Hide Post
What's the condition that'll determine your decision?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
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: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Virtuoso
posted Hide Post
You should probably try -DEFAULT instead of -DEFAULTH.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
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: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report 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: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

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

Copyright © 1996-2020 Information Builders