While adding a few lines to an existing tag event script I got the following error on the console:
I discovered that I had to remove a bunch of comments to get it to accept the edits. It is a pretty long script (about 100 lines). It seems there is some limit to the length of these scripts. Is it intentional?
Have you guys fixed this length in any of the newer versions?
We’re running 7.7.4 an it is still limiting the number of characters.
In my case, I needed to be able to send an email when the value changes in the positive direction, ie., increases. Decreases are fine in this case. So I have a simple IF
if currentValue.value > previousValue.value:
Then I have a bunch of string concatenations to build several tables for the email. I’m also doing a couple of SQL queries to pull data out of the database (like to see who send the email too). There’s a couple of loops involved. In other words, it’s not complicated code. It’s just a lot of text.
I can understand why you’d want to enforce a limited amount of code on a tag change event, as these can be fired off pretty fast. However, if you’re going to limit the text then there needs to be some obvious message or a much more obvious error then:
[quote]An error occurred while committing, continue?
data exception: string data, right truncation[/quote]
It took me a while of trial and error to figure out what was causing the error.
On a second note, if this text length can be easily worked around by calling a shared or project script, then why have it limited at all?