Skip to main content
Participant
February 27, 2024
Question

New Employee Form

  • February 27, 2024
  • 1 reply
  • 418 views

I'm working on setting up an a new employee form.  I'm attempting to setup this so when a new employees position is selects the checkboxes for the required software for that position is automatically selected.  The issue i'm running into is that once I add the second position to the script and the software selections are duplicated it will not check those boxes.  Here is the script I'm trying to use.

 

this.getField("Bluescreen").checkThisBox(0,event.value == "JD-Warehouse" ? true : false);

this.getField("Netsuite").checkThisBox(0,event.value == "JD-Warehouse" ? true : false);

this.getField("Bluescreen",).checkThisBox(0,event.value == "JD-Customer Service" ? true : false);

this.getField("Salesmannumber").checkThisBox(0,event.value == "JD-Customer Service" ? true : false);

this.getField("Netsuite").checkThisBox(0,event.value == "JD-Customer Service" ? true : false);

this.getField("ECS").checkThisBox(0,event.value == "JD-Customer Service" ? true : false);

this.getField("Dubber").checkThisBox(0,event.value == "JD-Customer Service" ? true : false);

this.getField("Webex").checkThisBox(0,event.value == "JD-Customer Service" ? true : false);

this.getField("Osmosis").checkThisBox(0,event.value == "JD-Customer Service" ? true : false);

this.getField("Bluescreen").checkThisBox(0,event.value == "JD-Sales" ? true : false);

this.getField("Netsuite").checkThisBox(0,event.value == "JD-Sales" ? true : false);

this.getField("Salesmannumber").checkThisBox(0,event.value == "JD-Sales" ? true : false);

this.getField("Salesloft").checkThisBox(0,event.value == "JD-Sales" ? true : false);

this.getField("Salesforce").checkThisBox(0,event.value == "JD-Sales" ? true : false);

 

How can I set it so multiple positions are able to select the same software checkboxes?

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
February 27, 2024

You can use something like this:

 

this.getField("Bluescreen").checkThisBox(0, event.value == "JD-Warehouse" || event.value == "XYZ-Warehouse" || event.value == "1234-Warehouse");

Participant
February 27, 2024

That appears to have worked perfectly!!  

 

Thank you very much.