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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Compound If Statements

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Compound If Statements
 Login/Join
 
Silver Member
posted
How can I put the following two IF statements together to make a compound IF statement?

IF (EDIT(ORG_CD,'9') EQ ‘B’ or ‘2’) AND (SUPERVISOR_LEVEL NE ' ') THEN RATINGX
ELSE RATINGY

IF (EDIT(ORG_CD,'9') EQ ‘B’ or ‘2’) THEN RATINGZ ELSE RATINGY

I've tried the below compound statement, but it omits the record that recently moved into the 'B' or '2' org and still have a RatingY.

IF (EDIT(ORG_CD,'9') EQ ‘B’ or ‘2’) AND (SUPERVISOR_LEVEL NE ' ') THEN RATINGX
ELSE IF (EDIT(ORG_CD,'9') EQ ‘B’ or ‘2’)THEN RATINGZ ELSE RATINGY

I'm trying to define a field in the master "Rating" that will hold all the ratings regardless of the org they are in.

I welcome any and all help.

Thanks,
 
Posts: 47 | Registered: March 29, 2005Report This Post
Virtuoso
posted Hide Post
quote:
IF (EDIT(ORG_CD,'9') EQ ‘B’ or ‘2’) AND (SUPERVISOR_LEVEL NE ' ') THEN RATINGX
ELSE IF (EDIT(ORG_CD,'9') EQ ‘B’ or ‘2’)THEN RATINGZ ELSE RATINGY


Without knowing your data, if the person who 'moved' into 'B' or '2' and still has RATINGY, and assuming these ratings are all fields in the master, you may have to add more checks to your define, such as what is in the RATING_ field in question. Are they balnk if the other rating is still filled?


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Silver Member
posted Hide Post
RatingY is the field in the master, RatingX and RatingZ are in a separate table which I joined by using a Set All=ON. RatingX is a supervisor rating, RatingZ is an IC rating, and RatingY represents both supervisors and ICs. When a person moves into the B or 2 org, they keep the Y rating until they receive a new review and vice versa.

Thanks for asking questions, it helps me think thru what I'm trying to do.
 
Posts: 47 | Registered: March 29, 2005Report This Post
Silver Member
posted Hide Post
quote:
Originally posted by Tom Flynn:
quote:

IF (EDIT(ORG_CD,'9') EQ ‘B’ or ‘2’) AND (SUPERVISOR_LEVEL NE ' ') THEN RATINGX
ELSE RATINGY

IF (EDIT(ORG_CD,'9') EQ ‘B’ or ‘2’) THEN RATINGZ ELSE RATINGY


Thanks for your input Tom, I've tried that, but the supervisor that just moved to the 2 org shows a blank when I request a report on the 2 org.



I would:

TEST1/AXX = IF (EDIT(ORG_CD,'9') EQ ‘B’ OR ‘2’) AND (SUPERVISOR_LEVEL NE ' ') THEN RATINGX ELSE
IF (EDIT(ORG_CD,'9') EQ ‘B’ OR ‘2’) AND (SUPERVISOR_LEVEL EQ ' ') THEN RATINGZ ELSE RATINGY;

Make sure your OR is in CAPS...
 
Posts: 47 | Registered: March 29, 2005Report This Post
Guru
posted Hide Post
I might try this:

IF    (EDIT(ORG_CD,'9') EQ ‘B’ OR ‘2’) 
THEN  (IF (SUPERVISOR_LEVEL NE ' ') 
       THEN RATINGX 
       ELSE RATINGZ)
ELSE   RATINGY
  


Be sure to put the expression after the THEN in '( )'.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Master
posted Hide Post
Try this:
IF EDIT(ORG_CD,'9') NE ‘B’ AND ‘2’
  THEN RATINGY
  ELSE IF SUPERVISOR_LEVEL NE ' '
         THEN RATINGX 
         ELSE RATINGZ;


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Silver Member
posted Hide Post
Thanks everyone for your help. Your suggestions were very helpful. Everything is working as it should.
 
Posts: 47 | Registered: March 29, 2005Report 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     Compound If Statements

Copyright © 1996-2020 Information Builders