Skip to main content
Participant
April 11, 2019
Question

Subtraction formula issue

  • April 11, 2019
  • 2 replies
  • 478 views

I have tried all previous suggestions and cannot get my subtraction formula to work.

I'm entering the following:

var a = this.getField("CurrentFeesPaid").value; // variable for the Current value

var b = this.getField("Totalmonthlypaid").value; // variable for the Total value

event.value = a - b; // compute difference of the two values

I want to subtract Total monthly paid from Current Fees Paid. I've tried simple and I've tried custom and nothing seems to actually calculate. In total monthly paid there is a formula adding several fields together. Please help.

This topic has been closed for replies.

2 replies

Bernd Alheit
Community Expert
Community Expert
April 11, 2019

Check the console for errors.

TᴀW
Legend
April 11, 2019

Check spelling (is it Totalmonthlypaid or TotalMonthlyPaid, etc.).

Check the calculation order of the fields. The Total Monthly field must be calculated before the Total field...

id-extras.com | InDesign tools & scripts for typesetters, form designers, and translators