How can I set a default value for a dropdown field in an Incident form?

Document ID : KB000010297
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

Very often, users are presented with forms that include dropdown fields. 

Administrators may want a particular dropdown value or item to appear in the field as the initial value.  

Administrators may want users to be able to override the value by clicking on the dropdown arrow and selecting a different value.

 

 

 

Background:

Sometimes the value shown for the dropdown field of a form is "<empty>", or it is a different valid value.

When the user clicks the down arrow for that field, a list of items is presented and the user may select one of the values from the list by clicking on it.

Environment:
CA Service Desk Manager 14.1
Instructions:

An example would be specifying a default value for the "Symptom" dropdown field of an Incident.

The instructions below show how to set an initial value for the Symptom field.

For the example, when an analyst user creates a New Incident, the initial value for the Resolution field is not set; instead, "<empty>" appears at the top of the list of values for that field.

emptyvalue.png

Click on the down-arrow to view the dropdown list of values:

listofvalues.png

For the purpose of this example, notice that "Error Message" is a valid value.

Right-click on the form to find out the name of the form:

whichform.png

In this case the form is "detail_in.htmpl".

Open that form in Web Screen Painter (WSP).

Whilst in WSP and with the form open, right-click on the "Symptom" field, and then select "Properties":

showproperties.png

Notice that the "Default" row in the Properties form has no associated value; that is, the field to the right of it, is blank.

Enter a valid value into the right column next to the Default property, for example, enter "Error Message":

entervalue.png

Click the "X" in the upper right corner of the Properties form to save the change.

Click "File" and select "Save". Then, click "File" and select "Publish".

confirmpublish.png

Click "OK".

publishdone.png

From a command line prompt, run:

pdm_webcache -H

Clear the web browser cache.

To confirm the changes, create a new Incident:

newincident.png

Notice that the value displayed for the Symptom field is "Error Message".

The down arrow is still available if the user needs to set a different value for the Symptom field.  The value can be changed either before or after saving the incident.

 

 

 

Additional Information:

You could compare the resulting form to the original form to see the addition that is made by WSP to the form.

 

In the example in this technical document, the original form contained the following statement:

<PDM_MACRO name=dtlDropdown hdr="Symptom" attr=symptom_code">

And the resulting form contains the following statement:

<PDM_MACRO name=dtlDropdown hdr="Symptom" attr=symptom_code default="Error Message">