PDA

View Full Version : Using Arrows


dreimer
November 27th, 2012, 09:53 AM
I found the symbols I would like to use in rules in Fusion Pro. Is this possible to do? Here is my code. The U+25B2 is an up arrow and the U+25BC is a down arrow.

if (Right(Field("Locus"),Len("A")) == "A")
{
return "<span>" + RawText("U+25BC") + "</span>";
}
if (Right(Field("Locus"),Len("B")) == "B")
{
return "<span>" + RawText("U+25B2") + "</span>";
}
return "";

Thanks for any help.

Dan Korn
November 27th, 2012, 10:13 AM
You need to use either <unicode> tags or numeric entities. So any of these will work:
switch (Field("Locus")[0])
{
case "A":
return "<unicode>25BC</unicode>";
case "B":
return "<unicode>25B2</unicode>";
default:
return "";
}Or:
switch (Field("Name")[0])
{
case "A":
return "&#x25BC;";
case "B":
return "&#x25B2;";
default:
return "";
}
Or, with decimal values instead of hexadecimal:
switch (Field("Locus")[0])
{
case "A":
return "▼";
case "B":
return "▲";
default:
return "";
}
The latter two cases require the "Treat returned strings as tagged text" box to be checked to parse the entities. But it's not required in the first case, as <unicode> tags are always parsed, even in non-tagged text.

You could also create a Formatted Text Resource, and enter the characters in there from the keyboard, or by using the Character Map on Windows or the Character Palette on Mac.

dreimer
November 27th, 2012, 10:49 AM
Perfect Dan, works great, thanks!!

dreimer
November 28th, 2012, 05:58 AM
OK, so know I have another issue. I was able to get the arrows to work correctly on my PC but I need to also create a 3 of 9 barcode and for some reason the IDAutomation font is not there for this type of barcode, using the FP built in rule. I even re-installed Fusion Pro.

So, I tried to do this job on my MAC and I get the opposite, the font is available for the 3 of 9 barcode and it works correctly with the built in rule, but I can't get any of the three codes Dan posted to create the arrows. Anyone have any ideas???

Dan Korn
November 28th, 2012, 09:26 AM
OK, so know I have another issue. I was able to get the arrows to work correctly on my PC but I need to also create a 3 of 9 barcode and for some reason the IDAutomation font is not there for this type of barcode, using the FP built in rule. I even re-installed Fusion Pro.
The font should be there in Fonts in the Control Panel. You may need to restart the machine and then load fonts again to register it.
So, I tried to do this job on my MAC and I get the opposite, the font is available for the 3 of 9 barcode and it works correctly with the built in rule, but I can't get any of the three codes Dan posted to create the arrows. Anyone have any ideas???
You're probably using a different font which doesn't have glyphs for those Unicode characters. Check the composition log (.msg) file.