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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Dynamic conditional formatting?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Dynamic conditional formatting?
 Login/Join
 
Member
posted
Hoping someone can help or point me in the right direction. Let's say I have a grid with a category as the row, a date as the column, and some value:

Category Month 1 Month 2 Month 3 Etc
-------- ------- ------- -------
Category A 1234 0 0
Category B 0 2345 3456
Category C 0 0 0
(edit - sorry, this grid didn't display in the message the way it does in the editor, not sure how to fix but I think you get the idea).

Easiest way I can describe what I am thinking of is Excel.. you highlight the values and turn on conditional formatting. The formatting can be tied to whatever the values are.

In Webfocus I've been searching and the only way I can see to do formatting of cells is in the styling, and would be to style the sheet based on hard-coded values or based on comparing to some other cell.

Is there some relatively easy way in webfocus to to just color/style cells in a grid based on all the values displayed -- i.e. higher value cells are darker, lower value cells are lighter, 0's are white?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8009
 
Posts: 14 | Registered: March 27, 2017Report This Post
Virtuoso
posted Hide Post
Hi Jason,

First to have your sample properly displayed enclose with the code tag, most right icon :
</>
in the option ribbon of the discussion editor and place your text between the two tags.

Second :
Search in the Knowledge Base for : DEFMACRO. It could be a way to do it. You will then end up with topics on styling with macros.
Search in the Knowledge Base for : when clause in styling. It could be another way to do it. WHEN can be used in multiple ways.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Gold member
posted Hide Post
Jason, this will work I think.

TYPE=DATA, COLUMN=SSTORES, BACKCOLOR=RED,COLOR=WHITE, WHEN=SFLAG EQ 'L', $
TYPE=DATA, COLUMN=SSTORES, BACKCOLOR=YELLOW, WHEN=SFLAG EQ 'M', $
TYPE=DATA, COLUMN=SSTORES, BACKCOLOR=GREEN,COLOR=WHITE, WHEN=SFLAG EQ 'H', $
TYPE=DATA, COLUMN=N5,COLOR=BLACK,BACKCOLOR=YELLOW,STYLE=BOLD, WHEN=TSORT EQ 'X',$
TYPE=DATA, COLUMN=N6,COLOR=YELLOW,BACKCOLOR=YELLOW,STYLE=BOLD, WHEN=TSORT EQ 'X',$
TYPE=DATA, COLUMN=N7,COLOR=YELLOW,BACKCOLOR=YELLOW,STYLE=BOLD, WHEN=TSORT EQ 'X',$
TYPE=DATA, COLUMN=N8,COLOR=YELLOW,BACKCOLOR=YELLOW,STYLE=BOLD, WHEN=TSORT EQ 'X',$
TYPE=DATA, COLUMN=N9,COLOR=YELLOW,BACKCOLOR=YELLOW,STYLE=BOLD, WHEN=TSORT EQ 'X',$
TYPE=DATA, COLUMN=N10,COLOR=YELLOW,BACKCOLOR=YELLOW,STYLE=BOLD, WHEN=TSORT EQ 'X',$
TYPE=DATA, COLUMN=N11,COLOR=YELLOW,BACKCOLOR=YELLOW, WHEN=TSORT EQ 'X',$
TYPE=DATA, COLUMN=N12,COLOR=YELLOW,BACKCOLOR=YELLOW, WHEN=TSORT EQ 'X',$
TYPE=DATA, COLUMN=N13,COLOR=YELLOW,BACKCOLOR=YELLOW, WHEN=TSORT EQ 'X',$
TYPE=DATA, COLUMN=N14,BACKCOLOR=YELLOW, WHEN=TSORT EQ 'X',$


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 74 | Registered: December 23, 2013Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Jason-1:
...

Is there some relatively easy way in webfocus to to just color/style cells in a grid based on all the values displayed -- i.e. higher value cells are darker, lower value cells are lighter, 0's are white?


You can achieve a close approximation of Excel's Conditional Formatting > Color Scales feature for data in a column. Use COMPUTE (with NOPRINT) to capture the minimum and maximum values of the column, then further compute the range, and the endpoints of sections (quartiles or deciles or whatever granularity achieves a satisfactor gradient effect). Define a corresponding set of RGB color declarations (amper variables) for the sections thus defined, and reference them in your WHEN clauses for the background color of the column's cells.


I have an Excel file that will generate the RGB vars, for a 15-color breakdown. Send me a PM if you would like a copy.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
quote:
TYPE=DATA, COLUMN=N7,COLOR=YELLOW,BACKCOLOR=YELLOW,STYLE=BOLD, WHEN=TSORT EQ 'X',$
basic condtional formatting as seen in the above syntax will work. Although, I prefer using COLUMN=FileName rathe than COLUMN=N#. This makes it easier to mantan and follow the logic. Perhaps a NFR can be added to allow the selection of fields by name as well as reference numbers.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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     [CLOSED] Dynamic conditional formatting?

Copyright © 1996-2020 Information Builders