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.
Service Desk Manager 17.x
All Supported Operating Systems
The best way to approach this is to examine the original forms themselves. Please make sure to read this entire document first and compare the corresponding forms before proceeding with the changes. In addition, make any backups of any forms modified before proceeding with the changes.
Note: The following assumes an out-of-box copy of forms load_properties.htmpl and xx_prop_tab.htmpl. The actual forms in place may vary depending on patch levels and pre-existing customizations. The examples follow the running task of adding two (2) extra property listings, for a total of 25 properties.
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 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>"$list.is_default@,@$list.value@,@"</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:
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>"$list.is_default@,@$list.value@,@"</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>"$list.is_default@,@$list.value@,@"</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>
The 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:
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>
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.