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     Want to show the output as mentioned

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Want to show the output as mentioned
 Login/Join
 
Member
posted
Hi I have a requirement where in I have to suffix '*' in the Job_desc column. Here JOB_DESC is the parameter which is getting passed from HTML to the Procedure.

Here is the sample output.

Dept Job_Desc
--------------------------
MIS Manager
Asst.Manager
Secratery
Developer

Condition is Salary greater that 1000, all the members beloning to the above group should be suffixed with '*'.

Here is the required output.

Dept Job_Desc*
--------------------------
MIS Manager*
Asst.Manager*
Secratery
Developer*

Here we can have the required output using "Computes". But here the column selected/Deselected dynamically. How to show the Computed field(Job_Desc8) rather that column field(Job_Desc).

My procedure code is as follows....

-SET &ECHO=ALL;
-DEFAULT &outcol1 = 'FIRST_NAME';
-DEFAULT &outcol2 = 'LAST_NAME';
-DEFAULT &outcol3 = '';
-DEFAULT &outcol4 = '';
-DEFAULT &outcol5 = '';
-DEFAULT &DEPT = 'DEPARTMENT';
-DEFAULT &WFFMT = 'AHTML';
-SET &SORT1 = IF &outcol1 NE '' THEN 'BY &outcol1.EVAL ' ELSE '';
-SET &SORT2 = IF &outcol2 NE '' THEN 'BY &outcol2.EVAL ' ELSE '';
-SET &SORT3 = IF &outcol3 NE '' THEN 'BY &outcol3.EVAL ' ELSE '';
-SET &SORT4 = IF &outcol4 NE '' THEN 'BY &outcol4.EVAL ' ELSE '';
-SET &SORT5 = IF &outcol5 NE '' THEN 'BY &outcol5.EVAL ' ELSE '';
-SET &SORT1 = IF &outcol1 EQ 'FIRST_NAME' THEN 'COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME );' ELSE '';
-SET &SORT2 = IF &outcol2 EQ 'FIRST_NAME' THEN 'COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME );' ELSE '';
-SET &SORT3 = IF &outcol3 EQ 'FIRST_NAME' THEN 'COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME );' ELSE '';
-SET &SORT4 = IF &outcol4 EQ 'FIRST_NAME' THEN 'COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME );' ELSE '';
-SET &SORT5 = IF &outcol5 EQ 'FIRST_NAME' THEN 'COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME );' ELSE '';
-RUN
TABLE FILE EMPLOYEE
PRINT
COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME ); NOPRINT
AS 'FIRST_NAME*'
'EMPLOYEE.EMPINFO.DEPARTMENT' NOPRINT
&outcol1 NOPRINT
&outcol2 NOPRINT
&outcol3 NOPRINT
&outcol4 NOPRINT
&outcol5 NOPRINT
&SORT1
&SORT2
&SORT3
&SORT4
&SORT5
WHERE DEPARTMENT CONTAINS &DEPT.(OR(FIND DEPARTMENT IN EMPLOYEE)).DEPARTMENT.;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(,,,,).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$

Can anybody please help me out.

Thanks in advance.
 
Posts: 10 | Registered: April 19, 2006Report This Post
Virtuoso
posted Hide Post
Moju

I do not understand why you make this so complex

TABLE FILE EMPLOYEE
PRINT 
     JOB_DESC
     FIRST_NAME
     COMPUTE ST/A2 = IF CURR_SAL GT 10000 THEN '*' ELSE '';
BY DEPARTMENT
END

This will give you a simple list to start with.
If that comes a bit ot what you want, you can start playing with concatenation of the fields.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report 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     Want to show the output as mentioned

Copyright © 1996-2020 Information Builders