My purpose： When I click a CI record, open a form based on this CI category automatically. But now when I open a CI record, open a default form that doesn't apply to every CI. I need to select a appropriate form to open this CI again.
I have also stragled with this. The best thing that you can do (and it is quite ugly) is to force that configuration items of this category could be open only through a smart action. On the smart action you can use the form you wish.
You gonna need a custom bolean on CIs, name it "use_special_form".
Then create a ui rule that when a CI is opened and Category=xxxx and use_special_form is not true then display an error message notifying user that he must use a certain smart action to open this item. If the message is ERROR then the opened item will close.
Now construct a smart action for the cis. The smart action will user sd_dataform.bat using the form name that you wish and passing "+use_special_form=1".
What is left to do is to create a ui rule that when an existing item opened with "use_special_form=True" to make "use_special_form=False".
Now for all the items of this category use update all to set "use_special_form=True"
We have implemented this in different. The "Open CI" is a smart action. The application detail for the smart action is: Name : sd Form Command : sd_dataform.bat Start in: C:\Program Files\Hewlett-Packard\OpenView\service desk 4.5\client\bin
Smart action Parameters : [Category] [ID]
We have created Form with the names of Category, when use selects a CI and clicks on Action -> "Open CI" in the hp OpenView service desk window he/she should be able to see appropriate data in appropriate form(at).
For example: Software category has CI-Form Software and is called as: C:\Program Files\Hewlett-Packard\OpenView\service desk 4.5\client\bin\sd_dataform.bat "Software" "1023"
That sounded so good I tried to implement it. (4.5SP15) but when I put the [Category] in as the parameter and go back to the smart action it has [Categor&y] and then running the action results in The form [Categor does not exist. This is totally bizzare. If I replace [Categor&y] with the field selection again and do not return to the smart action it is OK.
Another issue is that I can't seem to get it to do the ID=[ID] criterion. I tried just [ID] like you had but that failed and so I tried ID=[ID] which seems to fit the Usage for SD_DataForm.