Require code not to be a calculation
A while ago Nesa (thank you again) supplied me with a piece of code which worked when entered into the 'Custom Calculation Script' of the dropdown field.
if(event.value == "select") {
this.getField("Group1234").display=display.hidden;
this.getField("Group12345").display=display.hidden;
}
else if(event.value == "no") {
this.getField("Group1234").display=display.hidden;
this.getField("Group12345").display=display.hidden;
}
else if(event.target.value == "yes"){
var nRslt = app.alert ("If this is an out of area deal, do you require the Logbook first being registered to ****** LTD?\n\nIf 'Yes' please make sure the customer is aware they will not be the first keeper on the logbook.",2,2);
if(nRslt == 4){
this.getField("Group1234").display=display.hidden;
this.getField("Group12345").display=display.visible;}
else{
this.getField("Group1234").display=display.visible;
this.getField("Group12345").display=display.hidden;}
}
However the alert window created by the script keeps appearing when you try and enter text into any field afterwards and I am unable to make the script work in either 'Actions > Run a Javascript' or 'Run Custom validation Script'
I have moved the calculation order so that the dropdown field is the very last field in the list, but the script still runs when you manipulate any field/dropdown after this dropdown field.
Is there an additional piece of script that i can add which will stop it from running after the selection of No/Yes has been made or is there another place that the code can be added to stop it from being seen as a calculation.
