CA Service Management

Expand all | Collapse all

Conditionally requiring fields base on request area

  • 1.  Conditionally requiring fields base on request area

    Posted 06-06-2016 02:05 PM

    Hi SDM Gurus,

     

    I've created a few required custom fields on the employee request form.  Right now, I've figured out how to conditionally display them based on which Request Area is selected using jQuery.

     

    The problem I'm having is that validation is catching these required fields even though they're not visible for the Request Areas that don't want to see them.

     

    Has anyone else worked through this sort of thing before?  If I can't somehow toggle the validation off as needed for these fields, perhaps I could make them not required in WSP, and then trigger SDM to make them required.

     

    Thoughts or insights anyone?  Thanks!!



  • 2.  Re: Conditionally requiring fields base on request area

    Posted 06-07-2016 07:44 AM

    Interesting approach but why you don't use the OOB  properties functionality designed by CA for such purpose?

    How  do you trigger your code? with a onchange event? you must be able to somehow clear the data at the entry of your code. note that jquery cache reside on client side therefore you have to specifically clear it each time with something like:

     

    function zclearCache() {

    for (var x in jQuery.cache){

          delete jQuery.cache[x];

          }

    }

     

    to be teste. Hope this help

    /J



  • 3.  Re: Conditionally requiring fields base on request area

    Posted 06-13-2016 01:04 PM

    I'm not quite sure I understand why you'd want to clear the field values?  Can you please explain?  Thanks!



  • 4.  Re: Conditionally requiring fields base on request area

    Posted 06-13-2016 05:25 PM

    To re-state Jerome's question - Why don't you use Request Area Properties?



  • 5.  Re: Conditionally requiring fields base on request area

    Posted 06-14-2016 08:06 AM

    We can't use the OTB Request Area Properties because our requirements call for a date field with a date-picker.  I tried using a jQuery UI datepicker on one of the custom properties, but couldn't get it to work properly.



  • 6.  Re: Conditionally requiring fields base on request area

    Broadcom Employee
    Posted 10-04-2017 12:40 PM

    Hello Michael -

     

    Just looking back at this question does not appear you have not yet received a valid recommendation to meet your requirements.  You're last update was back on June 14th - have you explored any other options since then?? 

     

    Let me know if we can consider this question answered if there's no further queries.  thanks. #customization