Difference between revisions of "Conditional Display of Drop-Down Content"
m |
m |
||
| Line 1: | Line 1: | ||
| + | __NOTOC__ | ||
| + | [[Category:Customizations]] | ||
| + | <div align='center'><font color="green">To make corrections or additions to this article, select the ''edit'' tab above.<br> | ||
| + | To discuss or ask questions about this article, select the ''discussion'' tab above.</font></div> | ||
| + | |||
| + | == Overview == | ||
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. | 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 == | + | == Procedures == |
| + | === 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, use '''whereclause="(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: | 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, use '''whereclause="(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: | ||
<source lang="html4strict"> | <source lang="html4strict"> | ||
| Line 19: | Line 26: | ||
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. | 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 === | |
| − | == Step 2. Clear the web cache == | + | |
The final step is to clear Service Desk's cache. The methods vary depending on release. | The final step is to clear Service Desk's cache. The methods vary depending on release. | ||
| Line 26: | Line 32: | ||
''For older releases'' execute [[pdm_webcache]] from a command prompt on the [[Primary Server]]. There is no need to run this command on the [[Secondary Server|Secondary Servers]]. | ''For older releases'' execute [[pdm_webcache]] from a command prompt on the [[Primary Server]]. There is no need to run this command on the [[Secondary Server|Secondary Servers]]. | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 06:38, 26 July 2008
To discuss or ask questions about this article, select the discussion tab above.
Overview
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.
Procedures
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, use whereclause="(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: <source lang="html4strict"> <PDM_MACRO NAME=dtlDropdown hdr="Priority" attr=priority lookup=no
evt="onBlur=\\\"detailSyncEditForms(this)\\\"">
</source> ...then add the whereclause to it. The result should look like this: <source lang="html4strict"> <PDM_MACRO NAME=dtlDropdown hdr="Priority" attr=priority lookup=no
evt="onBlur=\\\"detailSyncEditForms(this)\\\"" whereclause="(sym ='3-Medium') or (sym ='4-Low')">
</source>
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.
For r11.x releases publish your changes via the Web Screen Painter. The process of publishing automatically initiates a pdm_webcache.
For older releases execute pdm_webcache from a command prompt on the Primary Server. There is no need to run this command on the Secondary Servers.