MACRO - sc_field_syle() Does NOT accept varible for color option

I am fairly confident this is most likely a “bug”. I’m using the sc_field_style() macro to set the background color of a field (in a grid). How do I set the color parameter using a variable?

example:
sc_field_style({field_name}, ‘#121212’); Working properly

$varColor = ‘#121212’;
sc_field_style({field_name}, $varColor); NOT working (I’m guessing the programmers never thought we may need to pass a $var through the macro)

reason == when using the calendar form, there are “options” to set the event color. I’m saving the calendar event color in the calendar table (tblCalendarEvents.eventColor): in a grid form, displaying all the events, using the onRecord event, I need to retreive the value stored in the table (tblCalendar.eventColor = #121212) and pass the hex color to the sc_field_style() macro.

Thanks to anyone who can enlighten me on how to pass a hex color through the macro.

con variable global anda

[glo_color] = ‘#121212’;
sc_field_style({field_name}, [glo_color]);

Sorry Anibal, I’ve tried/used the global var on both SC ver 8.x as well as the ver 9.2 and the sc_field_style() macro does not allow any kind of variable for the second parameter.

[vCol] = ‘#FF7474’;
$vClr = ‘#FF7474’;
sc_field_style({calTitle}, ‘#FF7474’); -->> WORKS
sc_field_style({calID}, [vCol]); -->> DOES NOT WORK
sc_field_style({calID}, $vClr); -->> DOES NOT WORK

EVENT ON RECORD

// Check for record
$check_sql = “SELECT color FROM catagoria WHERE id = {categ}”;
sc_lookup(rs, $check_sql);

if (isset({rs[0][0]})) // Row found
{
//[col]={rs[0][0]};
[vcol]=’#FF7474’;
sc_field_style({categ},[vcol]);
}

[U][B]WORKS CORRECTLY

do not like capital letter, use [vcol][/B][/U]