I'm getting missing before statement, Do I need to separate +* and how do I do it?
event.value = Number(this.getField("field").valueAsString)"+"+*6+"%";
What are you trying to achieve, exactly?
Sry for late reply. I want value to show like this '+6%' but can't add + sign infront of *6 calculation.
Want you display '+6%' or want add 6% of the value?
I want it to display '+6%'
event.value = this.getField("field").valueAsString + "+6%";
field uses value from another field so it need to be *6+ "%" I just need + sign to appear in front of result,it should look something like this "+"+ *6+ "%" but it says missing before statement.
> I want it to display '+6%'
That's what my code does. I don't understand what you're asking for now.
Bottom line is that everything that you want to add to the value of the field as text needs to be in double-quotes, preceded by a + sign. If you want to include double quotes (or a back-slash) in the string, they have to be preceded by a back-slash.
Number is not static it's calculated from another field, I just used 6 as example, sry I should have mention that.
Anyway I managed to get it work with var x like this "+" + x*6+ "%". But would like to know if it's possible without var?
What is the value in x?