Hi,
I want to create a new field in a Document Definition and set its value equal to a subtraction of 2 other fields in the Document Definition. I know you can create Calculate Sum rules, but is there a script rule which could be used to subtract 2 values and assign it to a field?
Comments
3 comments
There is not a built in rule to subtract. You will need to create a custom script. Something like me.field("field1").value - me.field("field2).value = me.field("field3").value
Hi Scott,
Thanks for your response. I've tried a similar script but I get the following error: 'object doesn't support this property or method'. I've also tried without the Value and it just concatenates the strings together rather than adding the values together. Any thoughts?
Thanks,
Where are you putting the rule and what programing language are you using?
Please sign in to leave a comment.