Can a Custom Ticket Field be required ONLY when a specific Category is selected?

We have Custom fields for users to select and want them to be required, but only when the specific category is chosen.
For example: HR gets a ticket for employee termination, we want the username and title required then.  But if the HR ticket is for information regarding PTO policy, this is not required.  Thanks for your Help!

0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
Posted by: chucksteel 5 years ago
Red Belt
One way to approach this as a work around is to create a rule that looks for tickets in Category A that don't have a value in Field B or have the default value. Normally for required fields I set the default value to something like: REQUIRED: Enter the information here. If the field still contains that string then I send the user an email periodically. You can set the rule to run every 15 minutes if you want to be very aggressive.

Posted by: wroncallo 4 years ago
White Belt

Top Answer

Why not add JavaScript to a read only custom field that checks the value of the select list and then if Employee Termination is selected you make the fields required.

if (selObj.value == 'Employee Term')
    document.getElementById("myText").required = true;
    document.getElementById("myText").required = false;

  • You can't add Javascript to a custom field on the K1000. - chucksteel 4 years ago
    • Thanks, is there a reason why you can't add it to a read-only custom field? - wroncallo 4 years ago
      • You would have to put the Javascript code as the default value of the field and the K1000 escapes the value in that you enter so the browser doesn't render it as JavaScript. Instead it will display the code as text on the page. - chucksteel 4 years ago
      • That does not happen to me on the K1000, but perhaps my version is different? 6.4.120756 - wroncallo 4 years ago
      • I noticed that my model # says 1200, too, wonder if that is the difference too. - wroncallo 4 years ago
      • Interesting. How did you enter the JavaScript? When I did a quick test on my K1000 it showed the code. - chucksteel 4 years ago
      • Exactly as if you would enter it yourself on an HTML page: <script type="text/javascript"> code </script>

        Adding HTML has no escaping as well. - wroncallo 4 years ago
      • Ah, I see what I did. I made my custom field a Note and that doesn't work, but a text field does. Cool. - chucksteel 4 years ago
      • Excellent, I can definitely see why a note field would do what you said. Yes, the text field is what I use for this. - wroncallo 4 years ago
Posted by: Hobbsy 5 years ago
Red Belt
There is no functionality that will allow either

Custom fields to appear on certain conditions or

Any fields, custom or otherwise to be marked as required, dependant on certain conditions.

So in short, this is not possible

  • Thanks Hobbsy. That is what I was afraid of. - bstutz 5 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ