Copy link to clipboard
Copied
I have hit a block!..All I wish for is: if "User" is selected in Dropdown15a, "Dropdown15b" and "Exposurevolumequantity" are hidden and any values (Exposurevolumequantity) or previous selections (Dropdown15b) expunged!
The script is placed within the custom validation script of "Dropdown15a"
Dropdown15a has four options and I Have assigned Export values to the dropdown choices identified in the ()
" " (0), "Delivered form"(0), "Pre-measured"(0), "User"(1).
The " " is the initial drop down state i.e. empty(ish)
Other than 'Check spelling' no other option radios are selected.
this.getField("Dropdown15b").display = (this.getfield("Dropdown15a").valueAsString == "User") ? display.hidden : display.visible;
this.getField("Exposurevolumequantity").display = (this.getfield("Dropdown15a").valueAsString == "User") ? display.hidden : display.visible;
Copy link to clipboard
Copied
So what exactly is not working?
One possible problem is that the export values need to be unique, because it is the export value that uniquely identifies the list item.
Copy link to clipboard
Copied
Hi Thom,
Although the export values are assinged I am not actually 'calling' them in the script. What I can't understand is why the the scripts are not working using the valueAsString. All I want is to identify the "User" selection from the dropdown list. But if there is a code modification that would work with the export values rather than strings I am happy to assign unique identifiers 1 through to 4 and implement. Assuming the export value for "User" = 4 then I presume I would change the script to ......15a").value = 4 ? display.hidden : .....
Copy link to clipboard
Copied
I get this error
TypeError: this.getfield is not a function
1:Field:Validate
Copy link to clipboard
Copied
I think you've got it. The value of a dropdown or list field is the export value. Don't include the export, and the field value will be the display text. So you can go either way. Change the code to use the export, or remove the exports.
And you definately need to fix the error. JavaScript is case sensitive, so the name of the function is "getField" with a capital "F".
Copy link to clipboard
Copied
Thom,
Thank you.
I have revisited my code!
The strangest thing happens. I can use the dropdown to select any of the first three options (i.e. not User) and nothing happens.
However, as soon as I select the one of the same three options imeadiately after selecting "User" (Nothing happens imeadiately after selecting it) the two cells "Dropdown15b" and " ExposureVolumeQuantity" dissapear. Only to reapear on the next selection which can be any of the four options including "User". This is a consistent trait. the code only operates on the selction after the "User" option has been selected..Is there a logical reason? Happy to attach the form if it will help and there is a method to do so.
I have removed the export values from all four drop down options. Have selected "imeadiately commit values" and returned the code to .................this.getField("Dropdown15a").value == "User") ? display..........
All the "this.getFields" checked/corrected for case sensitive errors.
Kind regards
Rob
Copy link to clipboard
Copied
Delayed execution on a field change is usually one of two things.
1. "Commit immediately on selection" is not checked
2. Calculation Ordering is off (for caculation scripts only)
Doesn't seem like either of these two is your problem.
At this point you'll need to debug by inserting "console.println" statements into the code to track progress.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more