How to add additional properties to the Service Desk Form listings for Incidents and Requests.

book

Article ID: 39857

calendar_today

Updated On:

Products

SUPPORT AUTOMATION- SERVER CA Service Desk Manager - Unified Self Service KNOWLEDGE TOOLS CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

By default, Service Desk will display just the first 23 properties defined for a given category.  This document describes how to display additional properties beyond the default count of 23 displayed.

Environment

Clarity Service Management 17.2
Clarity Service Management 17.1

Resolution

The best way to approach this is to examine the original forms themselves.  Please make sure to read this entire document first, and compare to the corresponding forms, before proceeding with the changes.  Also, make any backups of any forms modified before proceeding on changes.

Note:  The following assumes an out of box copy of forms load_properties.htmpl and xx_prop_tab.htmpl as taken from a SDM 14.1 CP2 install.  The actual forms you have in place may vary depending on patch levels and pre-existing customisations.  The examples follow the running task of adding 2 extra property listings, for a total of 25 properties.

Also of importance:  There are, by default, 23 properties given.  Bear in mind that properties start counting from 0.  As such, the latest property display in the out-of-box forms is property "22".

The running examples tasks for adding two more properties, bringing the property display count to 25.

First form to consider is the load_properties.htmpl form

If you look at the form in Web Screen Painter or a text editor, lines 691 to 716 contain this block of code:

<PDM_IF "" != "$args.prop22.id">
   var valgrp0="";
   <PDM_IF "$args.prop22.validation_rule" != "">
     <PDM_LIST PREFIX=list WHERE="owning_rule.id=$args.prop22.validation_rule.id" FACTORY=prpval>
        valgrp0+=<PDM_FMT PAD=NO ESC_STYLE=HTML>"[email protected],@[email protected],@"</PDM_FMT>;
     </PDM_LIST>
   </PDM_IF>
<PDM_IF "100002" == "$args.prop22.validation_type">
   detailWriteProperty( 22, "$args.prop22.required",
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop22.label</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop22.value</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop22.sample</PDM_FMT>',
           'CHECKBOX');
<PDM_ELIF "100003" == "$args.prop22.validation_type">
   detailWriteProperty( 22, "$args.prop22.required",
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop22.label</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop22.value</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop22.sample</PDM_FMT>',
           'SELECT', valgrp0);
<PDM_ELSE>
   detailWriteProperty( 22, "$args.prop22.required",
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop22.label</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop22.value</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop22.sample</PDM_FMT>');
</PDM_IF>
/////////////////////////////////////////////////////////////////////////////////////////////////

The above code defines a singular property entry. 

To add additional properties to the load_properties.htmpl form:

  1. Copy the above block excerpt to a text file editor
  2. Do a file/replace action, switching in the text "22" with "23"
  3. Paste the above block of code, starting from line 717 (the line past the forward slashes)
  4. Repeat the above (incrementing the integer value in the file/replace action), and append the new block of code defining a property past the latest property added.

 

Example:  To bring the property count to 25 properties total, you will need to add this block of code, starting on line 717 (the line preceding should be a line of forward slashes).

<PDM_IF "" != "$args.prop23.id">
   var valgrp0="";
   <PDM_IF "$args.prop23.validation_rule" != "">
     <PDM_LIST PREFIX=list WHERE="owning_rule.id=$args.prop23.validation_rule.id" FACTORY=prpval>
        valgrp0+=<PDM_FMT PAD=NO ESC_STYLE=HTML>"[email protected],@[email protected],@"</PDM_FMT>;
     </PDM_LIST>
   </PDM_IF>
<PDM_IF "100002" == "$args.prop23.validation_type">
   detailWriteProperty( 23, "$args.prop23.required",
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop23.label</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop23.value</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop23.sample</PDM_FMT>',
           'CHECKBOX');
<PDM_ELIF "100003" == "$args.prop23.validation_type">
   detailWriteProperty( 23, "$args.prop23.required",
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop23.label</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop23.value</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop23.sample</PDM_FMT>',
           'SELECT', valgrp0);
<PDM_ELSE>
   detailWriteProperty( 23, "$args.prop23.required",
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop23.label</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop23.value</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop23.sample</PDM_FMT>');
</PDM_IF>
/////////////////////////////////////////////////////////////////////////////////////////////////
<PDM_IF "" != "$args.prop24.id">
   var valgrp0="";
   <PDM_IF "$args.prop24.validation_rule" != "">
     <PDM_LIST PREFIX=list WHERE="owning_rule.id=$args.prop24.validation_rule.id" FACTORY=prpval>
        valgrp0+=<PDM_FMT PAD=NO ESC_STYLE=HTML>"[email protected],@[email protected],@"</PDM_FMT>;
     </PDM_LIST>
   </PDM_IF>
<PDM_IF "100002" == "$args.prop24.validation_type">
   detailWriteProperty( 24, "$args.prop24.required",
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop24.label</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop24.value</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop24.sample</PDM_FMT>',
           'CHECKBOX');
<PDM_ELIF "100003" == "$args.prop24.validation_type">
   detailWriteProperty( 24, "$args.prop24.required",
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop24.label</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop24.value</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop24.sample</PDM_FMT>',
           'SELECT', valgrp0);
<PDM_ELSE>
   detailWriteProperty( 24, "$args.prop24.required",
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop24.label</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop24.value</PDM_FMT>',
               '<PDM_FMT ESC_STYLE=HTML PAD=NO>$args.prop24.sample</PDM_FMT>');
</PDM_IF>
/////////////////////////////////////////////////////////////////////////////////////////////////

Examining an unmodified load_properties.htmpl form, on lines 717 to 721, there will be this block of code:

</PDM_IF></PDM_IF></PDM_IF></PDM_IF></PDM_IF>
</PDM_IF></PDM_IF></PDM_IF></PDM_IF></PDM_IF>
</PDM_IF></PDM_IF></PDM_IF></PDM_IF></PDM_IF>
</PDM_IF></PDM_IF></PDM_IF></PDM_IF></PDM_IF>
</PDM_IF></PDM_IF></PDM_IF>

There should be the same number of </PDM_IF> tags as you have properties.  Out of box, the property count goes up to "prop22".  Given that property counts start from "0", there would be 23 </PDM_IF> tags. 

In the prior example, we are upping the property count to 25.  As a result, there should be 25 </PDM_IF> tags in place, or this block of code:

</PDM_IF></PDM_IF></PDM_IF></PDM_IF></PDM_IF>
</PDM_IF></PDM_IF></PDM_IF></PDM_IF></PDM_IF>
</PDM_IF></PDM_IF></PDM_IF></PDM_IF></PDM_IF>
</PDM_IF></PDM_IF></PDM_IF></PDM_IF></PDM_IF>
</PDM_IF></PDM_IF></PDM_IF></PDM_IF></PDM_IF>

 

Second form to consider is the xx_prop_tab.htmpl

If you look at the form in Web Screen Painter or a text editor, lines 123 to 125 contain this block of code:

<PDM_IF "" != "$args.prop22.id">
<PDM_MACRO name=dtlStartRow>
<PDM_MACRO name=dtlWriteproperty label="prop22.label" make_required="prop22.required" propnum=22 sample="prop22.sample" validation_rule=prop22.validation_rule.id validation_type="prop22.validation_type" value="prop22.value">

The above code defines a singular property entry. 

To add additional properties to the xx_prop_tab.htmpl form:

  1. Copy the above block excerpt to a text file editor
  2. Do a file/replace action, switching in the text "22" with "23"
  3. Paste the above block of code, starting from line 126 (past the line starting with "<PDM_MACRO name=dtlWriteproperty label="prop22.label"")
  4. Repeat the above (increment the integer value in the file/replace action), and append the new block of code defining a property past the latest property added.

Example:  To add the two additional entries, bringing up the count to 25 properties total, you will need to add this block of code, starting on line 126.

<PDM_IF "" != "$args.prop23.id">
<PDM_MACRO name=dtlStartRow>
<PDM_MACRO name=dtlWriteproperty label="prop23.label" make_required="prop23.required" propnum=23 sample="prop23.sample" validation_rule=prop23.validation_rule.id validation_type="prop23.validation_type" value="prop23.value">
<PDM_IF "" != "$args.prop24.id">
<PDM_MACRO name=dtlStartRow>
<PDM_MACRO name=dtlWriteproperty label="prop24.label" make_required="prop24.required" propnum=24 sample="prop24.sample" validation_rule=prop24.validation_rule.id validation_type="prop24.validation_type" value="prop24.value">

Examining an unmodified xx_prop_tab.htmpl form, on lines 126 and 127, there will also be this block of code:

<PDM_IF 0><!-- Prop22 --></PDM_IF>
</PDM_IF>

You will need to add the above block of code, starting from the number of properties in place and decreasing. 

Example:  For our running example, this should be added, above the line "<PDM_IF 0><!-- Prop22 --></PDM_IF>":

<PDM_IF 0><!-- Prop24 --></PDM_IF>
</PDM_IF>
<PDM_IF 0><!-- Prop23 --></PDM_IF>
</PDM_IF>

Additional Information

We recommend capping the property additions to not over 40 properties total.  The reason is that excessive properties added may cause performance issues in loading Service Desk forms.

See also: How to increase the Property fields of the Requests/Incidents/Problems area? (for releases prior to SDM 12.9)