Service Desk Practitioners Forum
cancel

Forms based on CI category

Highlighted
JeffMa
Respected Contributor.

Forms based on CI category

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.

How can I do?

Thanks in advance!
8 REPLIES
Ruth Porter
Acclaimed Contributor.

Re: Forms based on CI category

Hi there,

You can only select a form by File>Open or Ctrl+O; you cannot make it depend on an attribute of a record such as a CI.

There are many entries in the forum for this and an enhancement request to allow this so it may get better but not yet.

Sorry that this is not the answer you wanted.

Regards

Ruth
http://www.teamultra.net
Mahmood Khan_1
Super Contributor.

Re: Forms based on CI category

I struggled with this a lot because I have number of CI like many others - Ruth is correct that is the only way you can open the CI's based on the category
George M. Meneg
Acclaimed Contributor.

Re: Forms based on CI category

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"
menes fhtagn
George M. Meneg
Acclaimed Contributor.

Re: Forms based on CI category

Hm, I found a fault in this logic. You gonna need to fields to separate these items for the rest. The one is "need_special_form" (boolean) and the other "use_form" as text.

the use_form must be EMPTY for all configuration items. The need_special_form must be 1 for all CIs of the specific category.

The rule should be
When an item is opened and Category=xxx and need_special_form=1 and use_form<>"special_form" then display the error message.

Then create the smart action to pass +"need_special_form=1" +"use_form=special_form" to sd_dataform.bat

Then create a third ui rule

Before item is saved if the use_form<>Null then use_form set to maky empty.
menes fhtagn
Ganesha Sridhar
Outstanding Contributor.

Re: Forms based on CI category

Hello,

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"

Where 1023 is the CI Id.

Regards
Ganesha Sridhara

David Borojevic
Outstanding Contributor.

Re: Forms based on CI category

Ganesha,

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.

Any clues?

Cheers
Crist Vandendri
Outstanding Contributor.

Re: Forms based on CI category

All,

I do this without using smart actions using vbScript. What I do is the following. When someone opens a CI I immediately close it and reopen it with an appropriate form based on the CI category.

For some more info, have a look at following thread.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=878714

Crist
David Borojevic
Outstanding Contributor.

Re: Forms based on CI category

Thanks Crist - I might look at this too.

Thanks Ganesha - I managed to get it to work but had to resort to the criterion "Search Code=[Search Code]" - it didn't want to play ball with the ID.

I'll do some further checks on the & insertion on editing the Action and post a new thread if it is consistent.

Cheers