Copy link to clipboard
Copied
Really hoping I can get some help with this. I attached an example of what I need. If the user enters the hours FIRST in the RegHrs1 text field and then selects CDO (compressed day off) from the AbsencePayTypeDesc1 dropdown list, can an alert pop up that tells the user 'Do not enter hours' BUT if the user does NOT enter hours and then selects CDO (compressed day off) I don't need an alert to pop up. Thank you!
I answerd you on your other post.
Try this file and let me know if thats what you need.
https://drive.google.com/uc?export=download&id=160hb6cB1jtNGXdwXIa9v3E449gxQS4-2
I also wanted to add what worked for me:
I run a custom calculation script from the dropdown menu and deleted the validation scripts from both fields, as I found it wasn't exclusively necessary to use in this case.
var regHours = this.getField("RegHrs1");
var f = event.target;
if ( regHours.value !=="") {
if (f.valueAsString == "CDO (compressed day off)") { app.alert("Do Not Enter Hours", 0);
//regHours.value = "";
this.resetForm(["RegHrs1"]);
} else {
if ( regHours.value == "" && f.value
...
Copy link to clipboard
Copied
I answerd you on your other post.
Try this file and let me know if thats what you need.
https://drive.google.com/uc?export=download&id=160hb6cB1jtNGXdwXIa9v3E449gxQS4-2
Copy link to clipboard
Copied
Yes, I saw thank you! Sorry, I looked at my profile this morning and I couldn't find it. I thought maybe it disappeared
Copy link to clipboard
Copied
There is some issue going on with forum where posts keep dissapearing, not sure if it's bug or deliberately.
Copy link to clipboard
Copied
I applied to my form and it works exactly how I need it to now. Thank you so much for your help. I really apprectiate it!!
Copy link to clipboard
Copied
I also wanted to add what worked for me:
I run a custom calculation script from the dropdown menu and deleted the validation scripts from both fields, as I found it wasn't exclusively necessary to use in this case.
var regHours = this.getField("RegHrs1");
var f = event.target;
if ( regHours.value !=="") {
if (f.valueAsString == "CDO (compressed day off)") { app.alert("Do Not Enter Hours", 0);
//regHours.value = "";
this.resetForm(["RegHrs1"]);
} else {
if ( regHours.value == "" && f.valueAsString == "CDO (compressed day off)") {
event.value = f.value;
}
}
}
Copy link to clipboard
Copied
Nice! Thank you very much! I really appreciate your input! I'll give it a try.
Copy link to clipboard
Copied
It works great, thank you!