Focal Point
[SOLVED] What does '&|#x25B2;' mean?:

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8267079576

May 05, 2015, 05:22 PM
CoolGuy
[SOLVED] What does '&|#x25B2;' mean?:
Hey all,

I'm reviewing the code for the KPI widgets found in the 8.1.03 Responsive Demo from IBI, and I've come across some code I'm not familiar with. Does anyone here know what the code in the following snippet means? (I refer to the "&|#x25B2;" part of the code on line 22.)

-DEFAULTH &PRODUCT_CATEGORY = '_FOC_NULL';
-DEFAULTH &CUR_YEAR = '2013';
-DEFAULTH &CUR_MTH = '11';
-DEFAULTH &TARGET = '2.0';
-DEFAULTH &MEASURE = 'WF_RETAIL.WF_RETAIL_SALES.REVENUE_US';
-DEFAULTH &BUSINESS_REGION = '_FOC_NULL';

-SET &PREV_YEAR = &CUR_YEAR -1;

DEFINE FILE wfretail81/wf_retail
SALE_UNITY2/D20.2C = SALE_UNITY;
PY_MEASURE/D20.2C = IF WF_RETAIL.WF_RETAIL_TIME_SALES.TIME_YEAR LT &CUR_YEAR THEN &MEASURE ELSE 0;
CY_MEASURE/D20.2C = IF WF_RETAIL.WF_RETAIL_TIME_SALES.TIME_YEAR EQ &CUR_YEAR THEN &MEASURE ELSE 0;
END

TABLE FILE wfretail81/wf_retail
SUM
&MEASURE NOPRINT
CY_MEASURE AS 'ACT_VAL'
PY_MEASURE AS 'COMP_VAL1'
COMPUTE COMP_VAL2/D5 = (CY_MEASURE - PY_MEASURE) / PY_MEASURE * 100;
COMPUTE COMP_VAL3/A10 = IF COMP_VAL2 GE 0 THEN '&|#x25B2;' ELSE '&|#x25BC;';
BY WF_RETAIL.WF_RETAIL_TIME_SALES.TIME_MTH NOPRINT
WHERE WF_RETAIL.WF_RETAIL_TIME_SALES.TIME_YEAR FROM &PREV_YEAR TO &CUR_YEAR
AND WF_RETAIL.WF_RETAIL_TIME_SALES.TIME_MTH EQ &CUR_MTH ;
WHERE WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY EQ '&PRODUCT_CATEGORY';
WHERE WF_RETAIL.WF_RETAIL_GEOGRAPHY_CUSTOMER.BUSINESS_REGION EQ '&BUSINESS_REGION';
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS HOLD1 FORMAT BINARY
END
-RUN

-READFILE HOLD1
-RUN


Thanks in advance!

This message has been edited. Last edited by: CoolGuy,


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
May 05, 2015, 05:41 PM
David Briars
quote:
I refer to the "&|#x25B2;"
Looks like this COMPUTE is setting the HTML unicode for the black up-pointing and black down-pointing arrows.

Looks like if the value is positive, up arrow, negative down arrow.

Relatively common type of thing for KPI apps, though you could show related images instead.
May 06, 2015, 09:11 AM
Wep5622
More specifically, ▲ is de hexadecimal Unicode character-code for an HTML entity.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
May 06, 2015, 03:57 PM
Doug
The "|" prevents the "#x25B2;" from being seen as a variable...




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
May 08, 2015, 10:13 AM
CoolGuy
Thank you David, Wep5622 and Doug!! Appreciate the insights! Will now know going forward what these patterns refer to (unicode symbols, | for not a var, and the logic of the expression given). Appreciate you all!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
May 08, 2015, 01:43 PM
GavinL
It's Unicode/HTML Entity (hex) for an UP arrow.

The | is a WebFOCUS thing, as it thinks it's a variable starting with & amp and the | states it's not. The # is your HTML hex starting point.

The 25B2 is your code:
http://www.fileformat.info/inf.../char/25B2/index.htm



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server