Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Traffic Lights and FML NEW QUESTION
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Traffic Lights and FML NEW QUESTION
 Login/Join
 
Master
posted
Is it possible to have a traffic light using FML. So you have your metrics down the page, perhaps months across and evaluate the row to set a traffic light red or green in the final column. We can probably make the entire cell fill with red/green but we want the traffic light round dot symbol.

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


WebFOCUS 8.
Windows, All Outputs
 
Posts: 541 | Registered: June 28, 2013Reply With QuoteReport This Post
Master
posted Hide Post
we are on version 8008!


WebFOCUS 8.
Windows, All Outputs
 
Posts: 541 | Registered: June 28, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Robert

The way I have done that is to have red, yellow and green images of a round dot and use a DEFINE based on the thresholds you want to use. That should work fine with FML but I haven't tested it...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1609 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Master
posted Hide Post
Back on this...we are on 8008..did I understand you used images...can you elaborate or share some code....do you evaluate a condition and if a met display an image...? How does that work?


WebFOCUS 8.
Windows, All Outputs
 
Posts: 541 | Registered: June 28, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
I place my images in a common app folder and refer to it in a DEFINE or COMPUTE.


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 3024 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
can you share some code...we are on 8008...


WebFOCUS 8.
Windows, All Outputs
 
Posts: 541 | Registered: June 28, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Here is a DEFINE from a master file for the images.

<code>
DEFINE GreenKey/A200='<img src="/approot/gold_standard/g1.png" align="absmiddle" >';
TITLE='Green Key', DESCRIPTION='Green Key',
PROPERTY=UDA, $
DEFINE MiddleKey/A200=' ';
TITLE='Yellow Key', DESCRIPTION='Yellow Key',
PROPERTY=UDA, $
DEFINE RedKey/A200=' ';
TITLE='Red Key', DESCRIPTION='Red Key',
PROPERTY=UDA, $
</code>

MiddleKey and RedKey have the same img definition as GreenKey except a different image but not sure why it is not displaying properly
And here is the code to use them.

<code>
COMPUTE stoplight1/A200 = IF AVE.AVG_HANDLE_TIME LE 5.00 THEN GreenKey ELSE IF AVE.AVG_HANDLE_TIME GT 7.00 THEN RedKey ELSE MiddleKey;
AS ' '
</code>

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


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1609 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Master
posted Hide Post
quote:
Is it possible to have a traffic light using FML...and evaluate the row to set a traffic light red or green in the final column.


SET PAGE = OFF
TABLE FILE LEDGER
"General Ledger Report"
SUM AMOUNT AS 'Amount' 
 COMPUTE COLOR/A64 = IF AMOUNT GT 25000 THEN 'greendot' ELSE 
                      IF AMOUNT GT 20000 THEN 'bluedot' ELSE 'reddot'; 
                     NOPRINT
 COMPUTE KPI/A256 = '<span class="dot ' | COLOR || '"></span>';
                    AS ''
FOR ACCOUNT
  10$$     AS 'Cash' OVER
  1100     AS 'Accounts Receivable' OVER
  1200     AS 'Inventory'
ON TABLE SET STYLE *
 INCLUDE=warm.sty, $
 TYPE=HEADING, JUSTIFY=CENTER, SIZE=10, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<style>
 .dot {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  display: inline-block;  
 }
 .reddot {
  background-color: red;
 }
 .greendot {
  background-color: green;
 }
 .bluedot {
  background-color: blue;
 }
</style>
-HTMLFORM END  




Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2012/Tomcat Standalone Workstation: Windows 7/IE 11 Database: Oracle 12c/Netezza Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer, & ReportCaster

 
Posts: 768 | Registered: April 23, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Nice one David, Thinking Outside-The-Box Smiler
 
Posts: 3024 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Traffic Lights and FML NEW QUESTION

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.