Copy link to clipboard
Copied
Community I am new here and working on a file to benefit opur department. Google and Youtube have been helpful for somethings, but I cannot seem to locate a basic script for my project. Basically I have three word/text boxes one (name/TRVL 2 Name), two (dollar amount/TRVL 1 Trans Cost), and three (TRVL 2 Trans Cost) field to copy the dollar amount from word/text box two into. I only want the dollar amount to appear if TRVL 2 Name box has a name typed in it requardless of length (Bob Brewer, Mike Brewer, Michael Brewer, etc.) and if not then remains blank.
I have tried multiple ways, but I am not proficient in this realm of javascript and as mentioned I cannot find anything that works on my test page.
Thanks for any and all guidance. Hopefully this can be done and assist other people with the same issue.
Shannon Brewer
So you want to show value from field "TRVL 1 Trans Cost" in field "TRVL 2 Trans Cost" only if field "TRVL 2 Name" is not empty otherwise field "TRVL 2 Trans Cost" is empty?
You can use this in "TRVL 2 Trans Cost" field as custom calculation script:
var Tname = this.getField("TRVL 2 Name").valueAsString;
var Tcost = this.getField("TRVL 1 Trans Cost").value;
if(Tname != "")
event.value = Tcost;
else
event.value = "";
Copy link to clipboard
Copied
When you post a question you always need to tell the Adobe program you are using
There are MANY programs in a full subscription, plus other non-subscription programs
Please post the exact name of the Adobe program you use so a Moderator may move this message to that forum
Copy link to clipboard
Copied
[A moderator moved this from Using the Community.]
Which Adobe App or Service are you using?
Copy link to clipboard
Copied
I apologize my Government computer has Adobe Acrobat Pro XI.
Copy link to clipboard
Copied
<moved from cc services>
Copy link to clipboard
Copied
So you want to show value from field "TRVL 1 Trans Cost" in field "TRVL 2 Trans Cost" only if field "TRVL 2 Name" is not empty otherwise field "TRVL 2 Trans Cost" is empty?
You can use this in "TRVL 2 Trans Cost" field as custom calculation script:
var Tname = this.getField("TRVL 2 Name").valueAsString;
var Tcost = this.getField("TRVL 1 Trans Cost").value;
if(Tname != "")
event.value = Tcost;
else
event.value = "";
Copy link to clipboard
Copied
Nesa Nurani,
THANK YOU! This worked very much for sharing your knowledge. Now I can finalize my document.
Shannon