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 have a table output where I have multiple different task numbers as different fields. These will be dynamic based on an index table that is maintained by the business units. The value in these task fields is a date the task was completed. So for example, let's say I have these fields: Task1,Task2,Task3,Task4, and Task5.
I also have another field in my dataset that is just called Task. This Task field will have a numeric value such as 1,2,3,etc.
What I am wanting to do is use the output of the Task field to reference the other Task1,Task2,etc fields. Is this possible to do in WebFOCUS? Is there some type of function where the output of a field can be used to reference another field?This message has been edited. Last edited by: <Emily McAllister>,
WF 8.2.0.3 Windows 10 64bit HTML, AHTML, PDF, Excel
COMPUTE TASK_COMPLETION_DATE/HYYMD =
IF TASK EQ 1 THEN TASK1
ELSE IF TASK EQ 2 THEN TASK2
ELSE IF TASK EQ 3 THEN TASK3
ELSE IF TASK EQ 4 THEN TASK4
ELSE IF TASK EQ 5 THEN TASK5
ELSE '';
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 ended up using something similar to what you suggested Francis, but using some parameters to keep it somewhat dynamic.
SWES, I'll do some more research on DB_LOOKUP to see if it will get me there in a cleaner way.
Here's how I did it with parameters:
TASKCOMPARE/YYMD MISSING ON = IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK1NAME' THEN &TASK1NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK2NAME' THEN &TASK2NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK3NAME' THEN &TASK3NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK4NAME' THEN &TASK4NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK5NAME' THEN &TASK5NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK6NAME' THEN &TASK6NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK7NAME' THEN &TASK7NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK8NAME' THEN &TASK8NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK9NAME' THEN &TASK9NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK10NAME' THEN &TASK10NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK11NAME' THEN &TASK11NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK12NAME' THEN &TASK12NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK13NAME' THEN &TASK13NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK14NAME' THEN &TASK14NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK15NAME' THEN &TASK15NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK16NAME' THEN &TASK16NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK17NAME' THEN &TASK17NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK18NAME' THEN &TASK18NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK19NAME' THEN &TASK19NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK20NAME' THEN &TASK20NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK21NAME' THEN &TASK21NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK22NAME' THEN &TASK22NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK23NAME' THEN &TASK23NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK24NAME' THEN &TASK24NAME ELSE
IF 'TASK'|TRIM_(LEADING, '0', EDIT(TASK)) EQ '&TASK25NAME' THEN &TASK25NAME ELSE
MISSING ;
Thanks
WF 8.2.0.3 Windows 10 64bit HTML, AHTML, PDF, Excel
When we needed to do something like this recently, it helped to separate the 'column determination' from the 'final report' creation.
DEFINE FILE GGSALES
-* Not part of technique, just creating data.
TASKNAME/A10 = DECODE SEQ_NO(1 'CAR'
2 'COUNTRY');
END
-*
-* Pull requested column names.
-*
TABLE FILE GGSALES
PRINT TASKNAME
IF SEQ_NO EQ 1 OR 2
ON TABLE SAVE AS SVMETADT
END
-RUN
-SET &WORK = &LINES;
-*
-* Create report using requested column names.
-*
TABLE FILE CAR
PRINT
-REPEAT END_COL_DEFINITION &WORK TIMES
-READ SVMETADT &COLUMN_NAME.A10.
&COLUMN_NAME
-END_COL_DEFINITION
ON TABLE SET ONLINE-FMT STANDARD
END
1 PAGE 1
CAR COUNTRY
--- -------
JAGUAR ENGLAND
JENSEN ENGLAND
TRIUMPH ENGLAND
DATSUN JAPAN
TOYOTA JAPAN
ALFA ROMEO ITALY
MASERATI ITALY
AUDI W GERMANY
BMW W GERMANY
PEUGEOT FRANCE
No problem with combining the two processes, just an alternative approach that worked in our scenario.