Hi,
I have a labelling expression that need to input the '<' character.
I also have some text formatting like
a="<CLR red = '255'> <SUP>1</SUP></CLR>"
if [Qualifier] =='<':
b=' \x3c'
return [PointID]+b+[maxres]+a
and adding < simply break everything.
If I dont use the formatting, < can be added.
So how do I escape it?
The Text Formatting Tags help documentation says to use < in place of an angle bracket and & in place of an ampersand when using text formatting tags. Your formula becomes:
def FindLabel ( [Qualifier], [PointID], [maxres] ):
a="<CLR red = '255'> <SUP>1</SUP></CLR>"
if [Qualifier] =='<':
b=' <'
return [PointID] + b + [maxres] + a