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     conditionally formatting a field webfocus 5.2

Read-Only Read-Only Topic
Go
Search
Notify
Tools
conditionally formatting a field webfocus 5.2
 Login/Join
 
Platinum Member
posted
In WebFOCUS 5.2 does anyone have a way to conditionally format a field by changing the actual format. What I want is this:

table file car
print price and compute
perc/d5.1% = if country eq 'france' then .... else
whole/d5 = if country ne 'france' then ....

anyway, you get the idea - I either want a whole number to display or a fraction that is a percentage to display. I know the above is not correct syntax just trying to give the idea that in the same column either a whole or fraction.

Do I have to use FRL to achieve this?

Thanks in advance,
Vivian Perlmutter
www.aviter.com
vivian@aviter.com
 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report This Post
<mhuber>
posted
Try this:


TABLE FILE CAR
PRINT
DEALER_COST
RETAIL_COST
COMPUTE WHOLE = RETAIL_COST - DEALER_COST; NOPRINT
COMPUTE PCT = 100 * DEALER_COST / RETAIL_COST; NOPRINT
COMPUTE MYVAL/A10 = IF COUNTRY EQ 'ITALY'
THEN FTOA(PCT, '(D5.2%)', MYVAL)
ELSE FTOA(WHOLE, '(D7)', MYVAL);
BY CAR
BY MODEL
BY COUNTRY
END

The major caveat is that MYVAL is an alpha field... meaning you can't aggregate it. Although I'm not sure you'd want to aggregate whole numbers with percents anyway!

I hope this helps.
-Michael

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
Platinum Member
posted Hide Post
Thank you, thank you,

With a little tweaking to match my code, it worked perfectly!

Vivian Perlmutter
 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report 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     conditionally formatting a field webfocus 5.2

Copyright © 1996-2020 Information Builders