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.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
does anyone know how to disable or deal with that interfering wfc auto-prompt page in STUDIO? When a fex has a statement such as: -IF (&var.EXISTS) GOTO X ELSE GOTO Y..
That auto-prompt page pops right up! If you click the run button without entering anything, WFC will now think the var exists and go to X. I can never make it go to Y any more!
wf 7.6.11 unix aix active reports, HTML, Excel, Text and PDF formats
That's because the variable does exist always. The only exception that I know of is when using multi-selectable parameters and the indexed &var0, &var1, etc. are automatically created. For ALL parameters, they need to be resolved in some way before the procedure is run.
If a -DEFAULT is present and no other value is passed via a launch page, auto-prompt, or subsequent -SET, the default value is used, but the variable exists.
If the "Prompt for Parameters" property is off, the procedure would run without prompting. If a -DEFAULT or -SET is used, that value is used. if neither of those are used then the value is unresolved and you'll get and error like "A value is missing for &var."
So if an &var does NOT exist like in your code, there is no way to process it without an error. Make any sense?
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
yes and no. I thought the .EXISTS is to test for the existance of a var. If a var always exists as you said, what is the use of the code?
And, is there any way to test for the existance of a var other than using -DEFAULT and testing for the default value? I think that is an ulgy solution.
lastly, how does one turn off the "Prompt for Parameters" property for a fex in STUDIO?
wf 7.6.11 unix aix active reports, HTML, Excel, Text and PDF formats
After some additional digging, I stand corrected on a couple of points. From the manual (search for .EXIST in DevStudio Help):
.EXIST tests for the presence of a value. If a value is not present, a zero (0) is passed to the expression. Otherwise, a non-zero value is passed.
If a value is not supplied in the following example, &OPTION.EXIST is equal to zero and control is passed to the label -CANTRUN. The -HTMLFORM displays a message that the procedure cannot run. If a value is supplied, control passes to the label -PRODSALES.
-IF &OPTION.EXIST GOTO HRINFO ELSE GOTO CANTRUN;
-HRINFO
TABLE FILE CENTHR
.
.
.
END
-EXIT
-CANTRUN
-HTMLFORM BEGIN
<HTML>
<BODY>
TOTAL REPORT CAN'T BE RUN WITHOUT AN OPTION.
</BODY>
</HTML>
-HTMLFORM
END
-EXIT
I did note that it uses .EXIST, not .EXISTS and you would have to test that variable FIRST before any of your request would work. Without seeing the rest of your fex, its hard to tell how you are using it.
To turn off the "Prompt for Parameter" in DevStudio, right-click on the fex, select Properties, and turn off the "Prompt for Parameters" check box.This message has been edited. Last edited by: Darin Lee,
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
thank you, Darin. The .EXIST and not .EXISTS discrepancy answers my first question. However, there is no "Prompt for Parameters" check box in the fex's properties in DevStudio. By DevStudio, I meant the fex under Project on Localhost. The check box only exists for the fex if it is under "WFC environment" section.
Our preferred approach here is to test the fex in Project on Localhost which is the local pc before moving to "WFC environment" which is then on the server. Without being able to turn it offon localhost, then, the auto-prompt pops up and with your example, the code will never go to CANTRUN because the auto-prompt initializes the var (even to 0). Hence, full circle back to my original problem. Did I miss something? or there really is check box somewhere for the fex under Project on Localhost?
wf 7.6.11 unix aix active reports, HTML, Excel, Text and PDF formats
I think you're correct. This would be something that would exist in the MRE/web environment. So back to the original problem, here's a workaround.
use -DEFAULT to set &var to some value, then instead of &var.EXIST, just test the &var to see if it is still the default value.
-DEFAULT &VAR1='EMPTY'
-IF &VAR1 EQ 'EMPTY' THEN GOTO X ELSE GOTO Y;
If the value of &var has not been modified by user input from some launch page including the auto-prompt page, then it uses the default value. If the user inputs anything (including space or 0) in the parameter then the value is no longer the default and it would branch to Y.
Moving into the web environments, the other way should work.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
IBIF_wfdescribe is also a web client setting. It may or may not work in a local environment. However, since that setting would have to be determined before the fex was even read (the client needs to know HOW to run the fex - with or without prompting - before it looks at WHAT to run), I don't think it will work inside of the fex. It would work as an &var in a URL string. Also, changing the settting in your local client as Waz suggests, may resolve the problem locally.
P.S. Having ONE more line of code for the -DEFAULT isn't TOO much uglier, is it?
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007