Variable in macro will not work

Hallo

I use the function sc_field_style.
So I change depending on the status of the value of the background color of a value.

see:
sc_field_style (LiefDat {}, ‘#FF0000’, ‘12px’, ‘#FFFFFF’, ‘Arial, sans-serif’, ‘bold’);

I would now like to pass the color value as a variable:
like this:

$red = ‘#FF0000’;
sc_field_style (LiefDat {}, $red, ‘12px’, ‘#FFFFFF’, ‘Arial, sans-serif’, ‘bold’);

But it will not just work.

regards

Kai

[QUOTE=kai@schaefers-net.de;27140]Hallo

I use the function sc_field_style.
So I change depending on the status of the value of the background color of a value.

see:
sc_field_style (LiefDat {}, ‘#FF0000’, ‘12px’, ‘#FFFFFF’, ‘Arial, sans-serif’, ‘bold’);

I would now like to pass the color value as a variable:
like this:

$red = ‘#FF0000’;
sc_field_style (LiefDat {}, $red, ‘12px’, ‘#FFFFFF’, ‘Arial, sans-serif’, ‘bold’);

But it will not just work.

regards

Kai[/QUOTE]

Unfortunately sc_field_style does not accept variables as parameter. Besides that LiefDat{} ??

Hallo aducom

LiefDat{} was am mistake from me. I mean {LiefDat}

Try a global variable.

[colour] = ‘#FFFF80’;

:slight_smile:

jsb

@jsb: see reaction of Bartho: http://www.scriptcase.net/forum/showthread.php?4514-sc_field_style

Nevertheless, global variable works. At least in my case.

onRecord:
if ({status} == “overdue” )
{
[colour] = ‘red’;
sc_field_style(“status”,[colour]);
}

jsb