Skip to main content
Known Participant
March 25, 2021
Answered

Set default value in pdf but allow user to override

  • March 25, 2021
  • 1 reply
  • 723 views

Hi

I have a calculated field "Calc_Example". I want another field "Calc_Example_Override", where the default value is the same as the value of "Calc_Example" but where the user can override the value (and bring the suffix with it).

 

I've got the default bit working but not the override functionality. On searching this forum it looks like I may need to adjust the script to check the source of the event but to be completely honest, I don't even understand what that means. Can anyone give me an idea of what code I need to add & where? I've attached a basic example. TIA

This topic has been closed for replies.
Correct answer Nesa Nurani

As "Validation" script of "Calc_Example" use this:
this.getField("Calc_Example_Override").value = event.value;
As "Custom format script" of "Calc_Example_Override" use this:
event.value = event.value + " a";

This will allow you to override value in "Calc_Example_Override" until you change value in "Calc_Example".

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
March 25, 2021

As "Validation" script of "Calc_Example" use this:
this.getField("Calc_Example_Override").value = event.value;
As "Custom format script" of "Calc_Example_Override" use this:
event.value = event.value + " a";

This will allow you to override value in "Calc_Example_Override" until you change value in "Calc_Example".

Ang111Author
Known Participant
March 25, 2021

Perfect! Thank you once again 🙂