Copy link to clipboard
Copied
For example, other field = 4, therfore this new field should = 2024 (2020 + 4)
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.