Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how to add a subtraction field in text field properties

New Here ,
Oct 13, 2016 Oct 13, 2016

Form field.JPG

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.

TOPICS
Acrobat SDK and JavaScript , Windows
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 14, 2016 Oct 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);

Translate
Community Expert ,
Oct 13, 2016 Oct 13, 2016

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 14, 2016 Oct 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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 14, 2016 Oct 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:

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2016 Oct 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);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 14, 2016 Oct 14, 2016
LATEST

Perfect!

Thank you so much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines