Copy link to clipboard
Copied
Good Day Experts,
My issue today is that I have two text boxes I need to reflect into one text box based on precedents. If my first text box has an entry, I would like it to display the first text box. But if there is an entry in the second text box, I would like it to display what is in the second text box. Is this possible?
Copy link to clipboard
Copied
You want to show value in 3rd field?
You could use this as custom calculation script of 3rd field (change "Text1" and "Text2" to your actual field names of first and second 'text boxes'):
var t1 = this.getField("Text1").valueAsString;
var t2 = this.getField("Text2").valueAsString;
if(t2 !== "")
event.value = t2;
else if(t1 !== "")
event.value = t1;
else
event.value = "";
Copy link to clipboard
Copied
Enter the following custom validation script in the first text box:
this.getField("SecondTextBox").value=event.value;
Copy link to clipboard
Copied
You want to show value in 3rd field?
You could use this as custom calculation script of 3rd field (change "Text1" and "Text2" to your actual field names of first and second 'text boxes'):
var t1 = this.getField("Text1").valueAsString;
var t2 = this.getField("Text2").valueAsString;
if(t2 !== "")
event.value = t2;
else if(t1 !== "")
event.value = t1;
else
event.value = "";