Skip to main content
Participant
October 13, 2016
Answered

how to add a subtraction field in text field properties

  • October 13, 2016
  • 2 replies
  • 1305 views

I need to subtract B & C from A to get a sum in A-B-C

What formula should i use in field notation or custom.

This topic has been closed for replies.
Correct answer try67

You need to put a back-slash before each space in the field names...

It might be better to use a custom script for it, though.

The format of it should be something like this:

var a = Number(this.getField("A Approved...").value);

var b = Number(this.getField("B Amount...").value);

var c = Number(this.getField("C Spent...").value);

event.value = a - (b+c);

2 replies

somebunny
Known Participant
October 14, 2016

I agree with Try67.

While in the ABC field properties, here is the exact thing to put in the simplified field notation:

A - (B + C)

starhowleAuthor
Participant
October 14, 2016

Thank you to try67 & somebunny, but the sum is not totaling up. Am i missing something? below is what i have:

I am using Simplified field:

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
October 14, 2016

You need to put a back-slash before each space in the field names...

It might be better to use a custom script for it, though.

The format of it should be something like this:

var a = Number(this.getField("A Approved...").value);

var b = Number(this.getField("B Amount...").value);

var c = Number(this.getField("C Spent...").value);

event.value = a - (b+c);

try67
Community Expert
Community Expert
October 13, 2016

If those are the actual field names then enter exactly that under the "Simplified field notation" option.