Copy link to clipboard
Copied
I am creating a form for work, and I would like to set it up so if someone fills out a certain field with any data at all, it will populate a set text into another field. I have searched the forums for this, and have seem similar answers, but they are all based on varying data being entered and output. I am just unsure of how I would set the field to accept any input as opposed to a set text.
For example, if I have fields A, B, and C, where A would be the field they would be entering text. I would like it so regardless of what is entered into field A, fields B and C will populate with a set text. So I could type "Hello" into A, and B would populate with "Hi", and C would populate with "Bye", but if I were to type "Adobe" (or any other text) into field A, the other two would still fill with "Hi" and "Bye".
Copy link to clipboard
Copied
OK. In that case you use this custom Calculation script for each of them:
event.value = this.getField("A").valueAsString=="" ? "" : "Hi";
event.value = this.getField("A").valueAsString=="" ? "" : "Bye";
Copy link to clipboard
Copied
And if the A field is empty, do you want the user to be able to enter a value into B and C, or just have them as empty automatically?
Copy link to clipboard
Copied
They would always be empty until there is something entered into field A.
Copy link to clipboard
Copied
OK. In that case you use this custom Calculation script for each of them:
event.value = this.getField("A").valueAsString=="" ? "" : "Hi";
event.value = this.getField("A").valueAsString=="" ? "" : "Bye";
Copy link to clipboard
Copied
This worked! Thank you so much!!
Copy link to clipboard
Copied
Hello I have a similar situation,
Field A + Field B = Auto Populate Field A in Field C
if Field B is empty so would Field C
therefore I need Field B to trigger Field C.

