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.
Hello all. I am trying to create a defined field using the If, Then, Else statement below. I am trying to split the rows into groups based on the duration.
I keep getting an (FOC260) AN OPERATION IS MISSING AN ARGUMENT error when checking the statement.
The field DURATION that the statement refers to is also a defined field that is I5 and is a Date Difference function, calculating number of days from Start_Date to End_Date.
IF DURATION GE 0 AND LE 90 THEN '0 to 3 Months' ELSE IF DURATION GE 91 AND LE 180 THEN '4 to 6 Months' ELSE IF DURATION GE 181 AND LE 360 THEN '7 to 12 Months' ELSE IF DURATION GE 361 AND LE 540 THEN '13 to 18 Months' ELSE IF DURATION GE 541 AND LE 720 THEN '19 to 24 Months' ELSE IF DURATION GE 721 THEN 'Over Two Years' ELSE 'Conversion'
Can anyone find a the problem with my statement, or is it possibly because I'm using a defined field?
Thanks in advance.This message has been edited. Last edited by: MO Admin,
Kevin ______________________ Production: WebFocus 7.6.11 on Win2K3 Server Test: WebFocus 7.6.11 on Win2K3 Server Formats: Excel2K, PDF, HTML
IF DURATION GE 0 AND DURATION LT 91 THEN '0 to 3 Months' ELSE
IF DURATION GE 91 AND DURATION LT 181 THEN '4 to 6 Months' ELSE
IF DURATION GE 181 AND DURATION LT 361 THEN '7 to 12 Months' ELSE
IF DURATION GE 361 AND DURATION LT 541 THEN '13 to 18 Months' ELSE
IF DURATION GE 541 AND DURATION LT 721 THEN '19 to 24 Months' ELSE
IF DURATION GE 721 THEN 'Over Two Years' ELSE
'Conversion';
is how I'd code it.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
I would define a sort column that would be used in a BY column-name NOPRINT statement:
DURATION_SORT/A2 =
IF DURATION GE 0 AND DURATION LT 91 THEN '01' ELSE
IF DURATION GE 91 AND DURATION LT 181 THEN '02' ELSE
IF DURATION GE 181 AND DURATION LT 361 THEN '03' ELSE
IF DURATION GE 361 AND DURATION LT 541 THEN '04' ELSE
IF DURATION GE 541 AND DURATION LT 721 THEN '05' ELSE
IF DURATION GE 721 THEN '06' ELSE
'09';
Don't forget that defines like these probably do not get translated to SQL if you're accessing a DBMS table...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Description/A15=
IF DURATION GE 0 AND DURATION LT 91 THEN ' 0 to 3 Months' ELSE
IF DURATION GE 91 AND DURATION LT 181 THEN ' 4 to 6 Months' ELSE
IF DURATION GE 181 AND DURATION LT 361 THEN ' 7 to 12 Months' ELSE
IF DURATION GE 361 AND DURATION LT 541 THEN '13 to 18 Months' ELSE
IF DURATION GE 541 AND DURATION LT 721 THEN '19 to 24 Months' ELSE
IF DURATION GE 721 THEN 'Over Two Years' ELSE
'Conversion';
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005