you’ve got the syntax wrong, each expression works fine on it’s own, but they RETURN a value, they don’t modify the existing value.
var txt = value;
txt.trim(); // removes whitespaces in front of text and returns the value - doesn't change the value of "txt" variable
txt.substr(0/37);//limits the ORIGINAL string to 37 signs and returns it again. Expressions uses this as the last returned value
Therefore you need to do something like this:
var txt = value;
txt = txt.trim(); //removes whitespaces in front of text
txt = txt.substr(0/37); //limits the string to 37 signs
txt;
each expression will now update the value of the “txt” variable. hope that helps!