I am trying to put a message on my tickets, but I have run in to a problem…
I am trying to use…
[=TN('{REMAINING TOTAL}') != '0' ? '<C00>This is not an invoice' : '']
But it prints…
This == not an invocie
Any ideas?
I am trying to put a message on my tickets, but I have run in to a problem…
I am trying to use…
[=TN('{REMAINING TOTAL}') != '0' ? '<C00>This is not an invoice' : '']
But it prints…
This == not an invocie
Any ideas?
Escape is and see what happens. Obviously is
is reserved and it is being used somewhere like == so you would need to reword it and not use is or try escaping it.
Try
This isn’t an invoice
Many of my clients are not native English speakers, so the concept of an aporophe isn’t great for them.
I’m not sure is
equals ==
is a standard JScript substitution, is this not something the @emre has added in to make things easier?
I have tried escaping it, but it didn’t work.
For now this is what I have come up with, but it makes the template a little ugly:
[=TN('{REMAINING TOTAL}') == '0' ? '<C>Tank-Ha i' + 's a PADI 5-Star Dive Resort' : '']
It’s custom syntax he put in before we had js support. We did not always have js. The js support came with v5.
Why was this removed fromt he V5 Issue category?
@emre describes this category as…
I would have thought that this is strange or unexpected… No?
No it’s really expected because of how he designed the syntax. There will be some things that are reserved.
Seems a bit weird that the words and
, or
, not
, equals
all work normally. I get that some things like "
, \
and '
you expect to have to escape, but seems weird behaviour that this one word is reserved.
But fair enough, if you think this isn’t not normal then I guess it isn’t not an issue (didn’t want to write the word ==
)… Ooops
I agree it’s weird but you do understand why it is right? It’s a compromise for allowing us to use some Jscript the way we do. It’s not really a strange behavior or broken feature it’s just inconvenient c9mplexity of allowing us access to something advanced typically reserved for developers.
The zero should not be quoted.
Yep - @JTRTech pointed that out to me on a different post. I slowly going through all of my rules and checking them…
I find it interesting that the “is” word is causing an issue in the first place. I cannot test right now to confirm this is the case. Can anyone else test to confirm this?
Maybe try using double quotes on your sentence.