Need to make a drop down mandatory for a one requestor

Document ID : KB000013330
Last Modified Date : 01/02/2019
Show Technical Document Details
Introduction:

In CA service Desk Manager, we have multiple ways to make a specific field mandatory but the best and easiest way to customize the requirement is to use the HTMPL files. This functionality can be reverted back in a fly without major down time for any given environment. 

Question:

How to make a drop down field mandatory based on a specific user login?

Environment:
CA Service Desk Manager 12.9
CA Service Desk Manager 14.1
Answer:

The below code is the simple way of making an attribute mandatory / non-mandatory at web interface level only (sample code provided for understanding). 

 

<PDM_IF "$args.customer" == "A907CDA7B62BF2428E7CF2B25E95C059"> 

<PDM_MACRO name=dtlDropdown hdr="DROPDOWN" attr=DROPDOWN make_required=yes> 

<PDM_ELSE> 

<PDM_MACRO name=dtlDropdown hdr="DROPDOWN" attr=DROPDOWN> 

</PDM_IF> 

Additional Information:

Note:

1. "A907CDA7B62BF2428E7CF2B25E95C059" is the UUID for any given user

2. "make_required = yes" will enable the HTMPL code to ensure that there is a value provided for a selected field and would not be able to submit until a value is provided.

3.  A separate PDM_IF should be used for each field, or one could cluster all such fields that need to be made required for the given user under the same PDM_IF.

4.  If there are a large number of such fields that need to be made mandatory, consider designing a custom form group for the given user that has its own version of the given htmpl form that names all of the given fields as required.