Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
whileprintingrecords;
stringvar v_hexvalue;
numbervar x;
numbervar y;
numbervar z:= 1;
numbervar a := 0;
local stringvar array v_rgb;
v_hexvalue := replace({YourHexField},"#","");
while a < 3
do
(if isnumeric(v_hexvalue[z]) then x := tonumber(v_hexvalue[z]) else
if v_hexvalue[z] = "A" then x := 10;
if v_hexvalue[z] = "B" then x := 11;
if v_hexvalue[z] = "C" then x := 12;
if v_hexvalue[z] = "D" then x := 13;
if v_hexvalue[z] = "E" then x := 14;
if v_hexvalue[z] = "F" then x := 15;
if isnumeric(v_hexvalue[z+1]) then y := tonumber(v_hexvalue[z+1]) else
if v_hexvalue[z+1] = "A" then y := 10;
if v_hexvalue[z+1] = "B" then y := 11;
if v_hexvalue[z+1] = "C" then y := 12;
if v_hexvalue[z+1] = "D" then y := 13;
if v_hexvalue[z+1] = "E" then y := 14;
if v_hexvalue[z+1] = "F" then y := 15;
redim preserve v_rgb[a + 1];
v_rgb[a+1] := totext(((x * 16) + y),"#",0);
a := a + 1;
z := z + 2);
"(" + join(v_rgb,",") + ")"