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 - ๐Ÿ•Ž