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.
I don't believe you can use WHEN to conditionaly activate a WHERE statement. It is used to conditionaly activate SUBFOOT lines, and in STYLESHEET code. I would use Dialog Manager -IF to conditionaly activate WHERE statements, or compound logical expressions depending on the requirement.
In your example
WHERE (field1 EQ field2 AND field3 EQ 8)
OR
(field1 EQ field2 AND field3 EQ 9)
heres the doc on WHERE DOC LIB on WHERE WHERE is used with TOTAL as in WHERE TOTAL fieldname GT 100 or when comparing 2 fields WHERE field1 GT field2 IF can only be used when comparing one field to a value although WHERE can be used in place of IF, IF is older syntax; IF is a special case of WHERE. WHEN i have only seen in the stylesheet syntax WHEN=field GT 100 i've never seen it placed in code as a filter it doesn't seem to work; I tried creating a boolean and testing, as in your example, but no luck. Have you tried it in some complex filtering situation ? would you share a CAR file example? thanks.This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Alright, so WHEN is used for stylesheet and SUBFOOT/HEAD and will not function elsewhere, but -IF can be used along with a GOTO to skip about the WHERE statements so that only certain ones will be applied to the report.
I'll try that.
Thanks everyone!
------------------------------------------------------------------------ PROD: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode TEST: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode
Posts: 13 | Location: Pittsburgh, PA USA | Registered: November 18, 2005
Adam, you can use DM commands inside of the body of code of a fex, most assuredly. but in your example, CATOR1 needs to be a DM variable, or an &variable, in order to work in a DM statment. -IF &CATOR1 EQ 1 GOTO WARP1 ; I would in this case, just have -GOTO WARP&CATOR ; as my goto statment; your goto statements MUST terminate with a ; -GOTO NEXT1 ; The whole thing of putting ; at the end of an IF or WHERE statement makes me crazy,some GUI thing, so if you're hand coding,,,take 'em out. WHERE (FIELD EQ '&VARIABLE1'); i would say IF FIELD EQ '&VARIABLE1'
If you're thinking that DM can evaluate a value within your data set, ie if your CATOR1 is a variable in your file, no it wont work like that.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Actually the only Dialogue Manger commands that should be terminated by a semi-colon ';' are –SET and –IF.
All other DM commands should not have a semi-colon. In most cases they still work if you put one there, however with the code tightening that has been taking place in recent releases it’s becoming more important to get these minor details correct.
That's not exactly, absolutely correct. The documentation does not say you need a semi-colon to terminate a WHILE in a –REPEAT. Except you do unless you code it with END on the following line (not documented either).
Also even though the documenation very clearly states that -IF and -SET must be terminated with a semicolon END on a new line works for them as well.
-SET &COUNTER =0; -REPEAT ENDREPEAT WHILE &COUNTER NE 10 END -SET &COUNTER = &COUNTER +1; -TYPE COUNTER is &COUNTER -ENDREPEAT TYPE The End
-SET &COUNTER =0 END -IF &COUNTER EQ 0 GOTO ENDREPEAT END -ENDREPEAT TYPE The End &COUNTERThis message has been edited. Last edited by: <JG>,