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.

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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Nested IF THEN ELSE
 Login/Join
 
<kj>
posted
Any one has an Idea how to write Nested IF in webfocus 5.3.2

Some thing like this..

compute x/i1 = if VAR1 <> 'VAL1' then { if VAL2 <100 and VAL2 > 50 then 1 else if VAL2 <= 50 and VAL2 >10 then 2 else if VAL2 <= 10 and VAL2 >1 then 3 ...} else {if VAL2 <500 and VAL2 > 100 then 1 else if VAL2 <= 100 and VAL2 >50 then 2 else if VAL2 <= 50 and VAL2 >5 then 3 ... }

Thanks,
kj
 
Report This Post
Virtuoso
posted Hide Post
compute x2/a1 =
if val ne 5 then 'a' else if val ne 6 then 'b'
else if val is-from 1 to 4 then 'c' else if
val eq 5 or 6 then 'd' .....
;

Basically the same as you have it with the greater than less than and so on replaced with valid FOCUS comparators. Of course the above has a logic flaw in it. as 1 to 4 will be assigned an 'a' based on the first if, so you need to take care how you set it up. Once a true condition is hit, you're done.
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Guru
posted Hide Post
Is this what your trying to do:

if VAR1 NE 'VAL1' then
(if ((VAL2 GT 100) and (VAL2 LT 50)) then 1 else
if ((VAL2 GE 50) and (VAL2 LT 10)) then 2 else
if ((VAL2 GE 10) and (VAL2 LT 1)) then 3 else 0) else
if ((VAL2 GT 500) and (VAL2 LT 100)) then 1 else
if ((VAL2 GE 100) and (VAL2 LT 50)) then 2 else
if ((VAL2 GE 50) and (VAL2 LT 5)) then 3 else 0;

This message has been edited. Last edited by: <Mabel>,
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
<kj>
posted
Thanks CurtisA. Thats what exactly I am looking for.
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders