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





No comments:

Post a Comment