Need help... I'm trying to add auto text to a text field based on a value in a numeric field. I want my text field (summary box) to say "Passed" if the value (score box) is equal to 10 and the field to say "Not Passed" if the value is equal to less than 10. My numeric field is being calculated by selecting drop-down lists.
Thanks in advance for your help.
Ed Watson
Here's a link to the document I created...
https://files.acrobat.com/?trackingid=KGLIT#folder/c3106c32-2e69-4a5f-8ef2-94d25623dbfb
Solved! Go to Solution.
Views
Replies
Total Likes
Try this:
if (NumericField1.rawValue < 10) {
TextField1.rawValue = "Did Not Pass";
}
else {
TextField1.rawValue = "Passed";
}
Views
Replies
Total Likes
Its giving me the below error while accessing the file
"The file you are trying to access could not be found. The file may have been deleted or moved in another session".
Thanks,
Vipin
Sorry, I forgot to mark the file as public. Here's the correct link:
https://files.acrobat.com/preview/db89a487-0279-4a60-ba41-b0a3885f48f0
Views
Replies
Total Likes
I think I figured it out. I used the following script:
if(NumericField1.rawValue ==1){TextField1.rawValue = "Did Not Pass"}
if(NumericField1.rawValue ==2){TextField1.rawValue = "Did Not Pass"}
if(NumericField1.rawValue ==3){TextField1.rawValue = "Did Not Pass"}
if(NumericField1.rawValue ==4){TextField1.rawValue = "Did Not Pass"}
if(NumericField1.rawValue ==5){TextField1.rawValue = "Did Not Pass"}
if(NumericField1.rawValue ==6){TextField1.rawValue = "Did Not Pass"}
if(NumericField1.rawValue ==7){TextField1.rawValue = "Did Not Pass"}
if(NumericField1.rawValue ==8){TextField1.rawValue = "Did Not Pass"}
if(NumericField1.rawValue ==9){TextField1.rawValue = "Did Not Pass"}
if(NumericField1.rawValue ==10){TextField1.rawValue = "Passed"}
There's probably a cleaner way to do the same thing but at least this works for now. Hope this helps someone else.
Views
Replies
Total Likes
Try this:
if (NumericField1.rawValue < 10) {
TextField1.rawValue = "Did Not Pass";
}
else {
TextField1.rawValue = "Passed";
}
Views
Replies
Total Likes
Hi Jono. Thanks, I knew there was a better way to write the script.
On another note, is there a way to prevent the Text field from displaying the result until all selections in the drop-down fields have been made. Maybe the field can even say something like "Please make all selections".
Views
Replies
Total Likes
That's really going to depend on what your form looks like. You would need a loop to go through and check the values of all the dropdowns. And depending on how the form was put together that could get tricky.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies