I have a form where I want a field called COUNTCALL to increment by 1 each time a button called ADDNEW is pressed.
this is the script:
var NEWCALL = 1:
var ADDIT = 1;
{
COUNTCALL = raw.Value.NEWCALL + raw.Value.ADDIT + rawValue COUNTCALL+1;
this.rawValue = COUNTCALL;
}
And for the adding a new call is
xfa.sourceSet.HELPA.addNew()
Now the addNew() works perfectly, but the COUNTCALL isn't incrementing, and also it stops the addNew() function working when the above script is is activated by the appropriate button.
Remove the :
var NEWCALL = 1:
var ADDIT = 1;
{
COUNTCALL = raw.Value.NEWCALL + raw.Value.ADDIT + 1;
this.rawValue = COUNTCALL;
}
and all returns correctly.
I'm sure it's something simple. The project is running only one PC.
I've scoured through the forums but I can't seem to find another call describing this.
Many thanks
Al
Have you been reading the error messages?
Line 1 should end in a ";' not a ":".
It looks like you are adding 3 to the call count and not one each time the button is pressed.
COUNTCALL.rawValue = COUNTCALL.rawValue + 1;
Will add 1 to the count call field.
George Kaiser