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     Obtaining Field Description?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Obtaining Field Description?
 Login/Join
 
Platinum Member
posted
Is there a way to get the field description onto the report?

I created a variable which is used for the sort order and would like to display that into the header. For instance our field name for item number is ITNO and I would like it to say Item Number instead.

I know I write some JSP to obtain the text from the display field of the dropdown but I was wondering if WebFOCUS has a way to do this.

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Virtuoso
posted Hide Post
You should put that description in the master file
or when it is a local defined field you rename it by

PRINT
ITNO AS 'Item number'
etc

is this what you want?

Frank




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
Expert
posted Hide Post
Eric,

This is what Frank was referring to regarding the MASTER:

FILENAME=CAR,SUFFIX=FOC
SEGNAME=ORIGIN,SEGTYPE=S1
FIELDNAME=COUNTRY,COUNTRY,A10,FIELDTYPE=I,
TITLE='COUNTRY OF ORIGIN',$

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
Sorry I think I may have stated what I was looking for wrong. I was refering to putting it into the header and not the column titling.

The user has a dropdown for &DIMENSION which lets them sort by ITNO (Item NUmber), ITNM (Item name) ect and I need the Header to say "Item Number" if that is the &DIMENSION they selected.

So in the page header I have the following code:
Sort By: &DIMENSION

Which right now outputs:
Sort By: ITNO

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Expert
posted Hide Post
I would either:

in the report: use Dialogue Manager and DECODE the &DIMENSION values ITNO, ITNM to &DIMENSION_NAME

or

in the HTML launch page: use JavaScript to pass both the document.forms[0].DIMENSION.options[DIMENSION.selectedIndex].text and document.forms[0].DIMENSION.options[DIMENSION.selectedIndex].value


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
I was actually thinking of using DECODE, but wanted to avoid that if there were a lot of values in the drop down, but this can work for now.

I already use JSP on some reports to do this but here I have to setup more variables to accomplish this.

Thanks guys,

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Virtuoso
posted Hide Post
If you want this generalised for many fields, put the text you want for each field in the TITLE or HELPMESSAGE of the mfd. Then:
CHECK FILE Fn HOLD
TABLE FILE HOLD
PRINT HELPMESSAGE 
IF FIELD EQ &DIMENSION
ON TABLE SAVE
END
-RUN
-READ SAVE &HM.A30

You should be able to put this into a single -INCLUDE.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
If its a small list, then in your fex:
-DEFAULT &BYFIELD = 'ITNO';
-SET &BYFIELDNAME=DECODE &BYFIELD
('ITNO' 'ITEM NUMBER'
'PROD' 'PRODUCT NAME'
'BRND' 'BRAND NAME' ELSE '');
then in your heading
HEADING
"sorted by &BYFIELDNAME "
...(nb: leave blank space before closing " )
or, if its a long list, then
you can do this with a decode file.
Make these decode files in advance and park them on your server in your apps directory , then you have them ready whenever you need them in any fex.
TABLE FILE something
SUM COMPUTE BLANK/A1=' '; CODENAME
BY CODE
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS DECODE01 FORMAT ALPHA
END
...now you can use this list in two ways
-DEFAULT &MYFIELD = '1234';
-SET &MYFIELDNAME=DECODE &MYFIELD(DECODE01);
or similarly in a define where you're putting some codename on every code field.
You should be good to go, now, .eric.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Some good tips, thanks Alan and Susannah. I am just using the set/decode right now as there are only 5 options for this report. But your method for large lists should be helpful for the future.

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 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     Obtaining Field Description?

Copyright © 1996-2020 Information Builders