How to make Group as a required field on the Insert Workflow Task form on Requests, without having to enforce it on the Schema?


Article ID: 10651


Updated On:


CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager


Making a field as a Required field can be achieved in couple of ways. Normally enforcing it to be a Required field on the Service Desk Manager schema is one option, while the other one is to make such a field with is_required attribute set on the form level.

Service Desk supports required field validation for some common detail forms (example: detail_cr.htmpl) which have Save buttons. This specific form, insert_cr_wf.htmpl, is not a detail form and so would not come inherent with form validation support which is seen in other detail forms.


So, even if you were to change the form source code from:

1,20, "0","$args.wf_ins_grp.persistent_id","$args.wf_ins_grp",



1,20, "1","$args.wf_ins_grp.persistent_id","$args.wf_ins_grp",


The group field shows as required on the form level (has an asterisk next to the group field). However, you can still click on Add and insert a new workflow without populating the group field. The same issue persists with Assignee field too.


Release: SMITAM99000-14.1-Service Management-IT Asset Manager Package


1) In insert_wf.htmpl, identify the line:

<PDM_MACRO name=dtlForm button=false factory=chg>

2) Change it to look like: 

<PDM_MACRO name=dtlForm button=false factory=chg onsubmit="if(detailValidate()) return false;">

3) The above change is to add a form level validation, which will call an existing function: detailValidate().


4) Save and pdm_webcache or restart SDM to take care of the changes.


This function takes care of the validations to be done on the form.

Additional Information

As mentioned in the summary, this customization is out of scope of CA Support and is supported as is.