CA Service Management

Expand all | Collapse all

Is there a way to require an attachment to a Service Request in CA Service Catalog based on values selected from with in a Form attached to the Option Group that is attached to the request?

  • 1.  Is there a way to require an attachment to a Service Request in CA Service Catalog based on values selected from with in a Form attached to the Option Group that is attached to the request?

    Posted Jan 10, 2016 11:42 PM

    Is there a way to require an attachment to a Service Request in CA Service Catalog based on values selected from with in a Form attached to the Option Group that is attached to the request?  I have a request to make an attachment required based on if the user selects specific options from the form.



  • 2.  Re: Is there a way to require an attachment to a Service Request in CA Service Catalog based on values selected from with in a Form attached to the Option Group that is attached to the request?

    Posted Jan 11, 2016 09:58 AM

    Hi!

     

    You can make attachments mandatory on the service option level (i.e. Catalog > <select offering> > Definition > Edit Service Option > Attachment Mandatory). Unfortunately this option can only be enabled/disabled, there is no associated condition. I could suggest raising an Idea for consideration as an enhancement.

     

    Thanks,

    Jason



  • 3.  Re: Is there a way to require an attachment to a Service Request in CA Service Catalog based on values selected from with in a Form attached to the Option Group that is attached to the request?

    Posted Jan 21, 2016 10:57 AM

    I would suggest to use PAM and define a workflow for this.



  • 4.  Re: Is there a way to require an attachment to a Service Request in CA Service Catalog based on values selected from with in a Form attached to the Option Group that is attached to the request?

    Posted Jun 22, 2018 01:59 PM

    Edit: Realized after I posted this was an old post, leaving anyway in event it's useful for anyone else...

     

    Try something similar to following in form script as part of your onSubmit function (in our case the user input was the servers variable defined below)...

     

    //onSubmit
    onSubmit : function () {
        var attachments = document.getElementsByName("attachments-1")[0].innerText.match(/\(([^)]+)\)/)[1];
        var servers = ca_fdGetSelectedRadio(ca_fd.formId, 'radiog_servers');
        if(servers == "Custom" && attachments == 0) {
            alert("Attach a spreadsheet containing the custom server list using the Attachments link at the top or bottom of this form, then press Submit.");
            return false;
        } else {
            return true;
        }
    },