Hi my fantastic team of Spark experts,
I am doing a shape script where I have a <memo> field called "PainPoints"
I want to print a red cross on the element if ANY text is in this field, otherwise just ignore it.
I have done this in a connector successfully i.e.
if (HasTag("PainPoints","")) {}
else {
setfixedregion(40,-10,60,10);
setFillcolor(255,0,0);
rectangle(40,-10,60,10);
moveto(40,-10);
lineto(60,10);
moveto(60,-10);
lineto(40,10);
}
It works perfectly if something in, and does affect output if empty.
HOWEVER, when I come to do exactly the same feature for a component element, it doesn't seem to work and prints the else condition everytime.
Do you know if that is a bug, or do I have to do something different for a component? Code below. The issue is I get a cross whether I put something in the memo field PainPoints or not.
if (HasTag("PainPoints",""))
{}
else {
setfillcolor(255,0,0);
startpath();
moveto(38,35);
lineto(51,70);
moveto(38,70);
lineto(51,35);
endpath();
fillandstrokepath();
}