Monday, May 26, 2025

Custom exceptions UI in OAC/OAS table

 Sometimes we want to create an exceptions UI that is beyond the regular options of the tool.

Specifically, something like this:

Let's see what was created by default and what is a customization...

To create the square near the "% profit" I used the standard Conditional Formatting: 



Added an icon:
Add a note (you see it at the top right of the first image, only for the first line):

Since in the previous screen "Show rule condition" is marked, the Legend appears as well:


Now what about the extra column with the red and green squares? 
Since I don't have this visualization built-in, I created a dynamic column, with the following calculation:

case 
when @calculation("profit") < 0.1 then '馃煡馃煡馃煡馃煡馃煡馃煡馃煡馃煡馃煡馃煡' 
when @calculation("profit") < 0.2 then '馃煡馃煡馃煡馃煡馃煡馃煡馃煡馃煡馃煡馃煩' 
when @calculation("profit") < 0.3 then '馃煡馃煡馃煡馃煡馃煡馃煡馃煡馃煡馃煩馃煩' 
when @calculation("profit") < 0.4 then '馃煡馃煡馃煡馃煡馃煡馃煡馃煡馃煩馃煩馃煩' 
when @calculation("profit") < 0.5 then '馃煡馃煡馃煡馃煡馃煡馃煡馃煩馃煩馃煩馃煩' 
when @calculation("profit") < 0.6 then '馃煡馃煡馃煡馃煡馃煡馃煩馃煩馃煩馃煩馃煩' 
when @calculation("profit") < 0.7 then '馃煡馃煡馃煡馃煡馃煩馃煩馃煩馃煩馃煩馃煩' 
when @calculation("profit") < 0.8 then '馃煡馃煡馃煡馃煩馃煩馃煩馃煩馃煩馃煩馃煩' 
when @calculation("profit") < 0.9 then '馃煡馃煡馃煩馃煩馃煩馃煩馃煩馃煩馃煩馃煩' 
when @calculation("profit") < 1.0 then '馃煡馃煩馃煩馃煩馃煩馃煩馃煩馃煩馃煩馃煩' 
else '馃煩馃煩馃煩馃煩馃煩馃煩馃煩馃煩馃煩馃煩'  end


How does it work? The red square and many others are valid characters... I only use them. See examples here:

https://unicodeplus.com/U+1F7E5

or here:

https://www.compart.com/en/unicode/U+1F7E9

The remaining problem is the Oracle Analytics automatic column width. The above-mentioned squares need more space than regular character. 

As a "quick and dirty" work around I forced a longer column title:


You can always use "hard space" to force the longer header. Like this: "            The percent of profit"

Copy/Paste from the blog wouldn't work here, but you can always create a hard space by holding the "ALT" key and pressing 255. 


The same calculation works here as well (Watchlist UI):

 



Useful examples:

Orange Circle 1F7E0 - 馃煚

Yellow Circle 1F7E1 - 馃煛

Green Circle 1F7E2 -  馃煝

Purple Circle 1F7E3 - 馃煟

Brown Circle 1F7E4 - 馃煠


Red Sq. 1F7E5 -         馃煡

Blue Sq. 1F7E6 -        馃煢

Orange Sq. 1F7E7 -    馃煣

Yellow Sq. 1F7E8 -    馃煥

Green Sq. 1F7E9 -     馃煩

Purple Sq. 1F7EA -    馃煪

Brown Sq. 1F7EB  -  馃煫 


Blue Heart 1F499 - 馃挋

Green Heart 1F49A - 馃挌

Yellow Heart 1F49B - 馃挍

Purple Heart 1F49C - 馃挏

Heart Decor 1F49F - 馃挓


White star 2B50 - 

Manual W-Chair 1F9BD - 馃    267F - 

Nine Branches 1F54E - 馃晭