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     [SOLVED] Conditionally styling 3 value range (Traffic light)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Conditionally styling 3 value range (Traffic light)
 Login/Join
 
Gold member
posted
I'm having issues conditionally styling 3 value ranges (red/yellow/green).

What am I missing here? I would have expected any value less than 12,000 to be Red.

TABLE FILE CAR
SUM
CAR.BODY.SALES
BY CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
DEFMACRO=GREEN,
MACTYPE=RULE,
WHEN=N2 GE 30000,
$
DEFMACRO=YELLOW,
MACTYPE=RULE,
WHEN=N2 LT 30000,
$
DEFMACRO=RED,
MACTYPE=RULE,
WHEN=N2 LE 12000,
$
TYPE=DATA,
COLUMN=N2,
COLOR='GREEN',
MACRO=GREEN,
$
TYPE=DATA,
COLUMN=N2,
COLOR='YELLOW',
MACRO=YELLOW,
$
TYPE=DATA,
COLUMN=N2,
COLOR='RED',
MACRO=RED,
$
ENDSTYLE
END

This message has been edited. Last edited by: Joel Elscott,


WebFOCUS 8.2.03
z/OS
 
Posts: 66 | Registered: May 20, 2013Report This Post
Expert
posted Hide Post
Try changing the order of the TYPE=DATA styling as the order gives precedence -

TYPE=DATA,
COLUMN=N2,
COLOR='GREEN',
MACRO=GREEN,
$
TYPE=DATA,
COLUMN=N2,
COLOR='RED',
MACRO=RED,
$
TYPE=DATA,
COLUMN=N2,
COLOR='YELLOW',
MACRO=YELLOW,
$


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
I've tried messing with the orders as well. In your example nothing turns yellow Frowner


WebFOCUS 8.2.03
z/OS
 
Posts: 66 | Registered: May 20, 2013Report This Post
Platinum Member
posted Hide Post
Try this.
 
TABLE FILE CAR
SUM
CAR.BODY.SALES
BY CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
-*DEFMACRO=GREEN,
-*MACTYPE=RULE,
-*WHEN=N2 GE 30000,
-*$
-*DEFMACRO=YELLOW,
-*MACTYPE=RULE,
-*WHEN=N2 LT 30000,
-*$
-*DEFMACRO=RED,
-*MACTYPE=RULE,
-*WHEN=N2 LE 12000,
-*$
TYPE=DATA,
COLUMN=N2,
COLOR='GREEN',
WHEN=SALES GE 30000,
$
TYPE=DATA,
COLUMN=N2,
COLOR='YELLOW',
WHEN=SALES GT 12000,
$
TYPE=DATA,
COLUMN=N2,
COLOR='RED',
WHEN=SALES LT 12000,
$
ENDSTYLE
END
 
Posts: 109 | Registered: February 02, 2016Report This Post
Gold member
posted Hide Post
Thanks Pav, that worked! But I think there is a bug in the tool, this should work using the GUI. Glad I have a workaround though.


WebFOCUS 8.2.03
z/OS
 
Posts: 66 | Registered: May 20, 2013Report This Post
Expert
posted Hide Post
quote:
In your example nothing turns yellow

That's because there is no value LT 30000 and GT 12000 that would trigger the condition. There is one that is exactly 12000 but that does not fall into the conditions that you supply.

The one that Pav shows would be the better option as it utilises the ordering precedence by correctly utilising the boundaries that you set.

Notice that the (effective yellow macro) uses GT 12000 as opposed to LT 30000 that you used. To get that one line to be coloured yellow, this should really be GE 12000 and the one for red should be LT 12000.

If you were to leave your original and change these boundaries, then you should get what you wanted.

And yes, this is possible in the GUI if you carefully set your boundaries.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     [SOLVED] Conditionally styling 3 value range (Traffic light)

Copyright © 1996-2020 Information Builders