Highlighted

How do I have box value = current year (YYYY) + A certain value in another text box field.

New Here ,
Aug 07, 2020

Copy link to clipboard

Copied

For example, other field = 4, therfore this new field should = 2024 (2020 + 4)

TOPICS
Create PDFs, Edit and convert PDFs, How to, PDF forms

Views

17

Likes

Translate

Translate

Report

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

How do I have box value = current year (YYYY) + A certain value in another text box field.

New Here ,
Aug 07, 2020

Copy link to clipboard

Copied

For example, other field = 4, therfore this new field should = 2024 (2020 + 4)

TOPICS
Create PDFs, Edit and convert PDFs, How to, PDF forms

Views

18

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 07, 2020 0
try67 LATEST
Most Valuable Participant ,
Aug 07, 2020

Copy link to clipboard

Copied

Let's say the other field is called "B" and the first one is called "A". Use this code as the custom calculation script of "A":

event.value = new Date().getFullYear() + Number(this.getField("B").valueAsString;

 

Note that this will only cause the value to change when you edit the value of one of the fields in the file. It won't update automatically when the year changes. To do that you would need to use a doc-level code that will execute each time the file file is opened.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 07, 2020 0