/build/static/layout/Breadcrumb_cap_w.png

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 8 years ago
Red Belt
0
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 8 years ago
White Belt
0

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;
}
else
{
    document.getElementById("myText").required = false;
}

Comments:
  • You can't add Javascript to a custom field on the K1000. - chucksteel 8 years ago
    • Thanks, is there a reason why you can't add it to a read-only custom field? - wroncallo 8 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 8 years ago
      • That does not happen to me on the K1000, but perhaps my version is different? 6.4.120756 - wroncallo 8 years ago
      • I noticed that my model # says 1200, too, wonder if that is the difference too. - wroncallo 8 years ago
      • Interesting. How did you enter the JavaScript? When I did a quick test on my K1000 it showed the code. - chucksteel 8 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 8 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 8 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 8 years ago
Posted by: Hobbsy 8 years ago
Red Belt
0
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

Comments:
  • Thanks Hobbsy. That is what I was afraid of. - bstutz 8 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

Share

 
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