Conditional Display of Drop-Down Content
To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.
This article provides instructions on how to put a parameter on a drop-down list to allow for a unique list of options for each ticket type. The customization is ideal for shared codes that are used by multiple ticket types, such as Priority. Priority will be used in the example that follows.
Step 1. Edit the desired htmpl form
The dtlDropdown PDM_MACROs support the addition of a whereclause to further qualify the results. For example, if your Priority scale is something like 1-Emergency, 2-High, 3-Medium, 4-Low, usewhereclause="(sym ='3-Medium') or (sym ='4-Low')" if you wish to only show the 2 lowest options. To implement this logic simply look for the following syntax:
<PDM_MACRO NAME=dtlDropdown hdr="Priority" attr=priority lookup=no evt="onBlur=\\\"detailSyncEditForms(this)\\\"">
...then add the whereclause to it. The result should look like this:
<PDM_MACRO NAME=dtlDropdown hdr="Priority" attr=priority lookup=no evt="onBlur=\\\"detailSyncEditForms(this)\\\"" whereclause="(sym ='3-Medium') or (sym ='4-Low')">
A change such as this will allow you to have options that are tailored to the ticket type.
While I used the sym values in the example above, I would recommend actually using the id, enum, persid, or code value that is actually saved to the ticket. Whenever a sym or name field is referenced there is always the chance of the sym/name being changed and thus requiring updates to your customizations.
For r11.x releases it is recommended that you edit your pages via the Web Screen Painter. For older releases you must edit the files directly.
Step 2. Clear the web cache
The final step is to clear Service Desk's cache. The methods vary depending on release.