Service Desk Practitioners Forum
cancel

Setting category with sd_dataform

SOLVED
Go to solution
Highlighted
Robert S. Falko
Acclaimed Contributor.

Setting category with sd_dataform

Hello,

I wish to create new Service Calls using sd_dataform. This technique does not seem able to set values for fields like the category or the folder. However, I wish to set values via sd_dataform for certain custom fields which are enabled only for a given category.

I can set the category via the template, but I cannot select the template using sd_dataform.

Result: if the category is not set in the template, sd_dataform cannot set it and the fields that are enabled only for that category are not set either.

I also tried using the system action "Create a subcontractor call". There, too, I cannot set the template to use, so it is not useful for our purposes.

Obviously, we can just ask users to set the template manually, but I want to avoid that solution because it is too error prone.

Any suggestions?

Thanks,
Josh
12 REPLIES
Gyula Matics_1
Acclaimed Contributor.

Re: Setting category with sd_dataform

Josh,

It is possible to set values via sd_dataform for code fields. I've just tested Category and Classification and they've worked. Folder does not work, but you can set up a hidden custom field, plus a bunch of UI rules to set the value. (if you don't have too many folders...)

This is what worked: sd_dataform "Service Call" -forcenew "+Category=Incident" "+Classification=Software"
Robert S. Falko
Acclaimed Contributor.

Re: Setting category with sd_dataform

Gyula,

Which version are you on? I can assure you that with SP8 the setting of the category fails on our system.

Thanks,
Josh
Terry A. Moir
Outstanding Contributor.

Re: Setting category with sd_dataform

Josh,

We use sd_dataform extensively and have no problems setting the category. I just did a test and using sd_dataform created a Work Order from a Service Call, set the Category, and also set a custom field only enabled for that category. This you should be able to do.

We can't, however, set the Folder. In our case, the folder is associated to a persons role, so we have set up all that role's templates to include the Folder. We basically control the folder based on a person's role. Ruth had an idea in a previous post on setting the folder to the same as the folder of the person via a rule - something I'm still thinking about...

Terry
Terry A. Moir
Outstanding Contributor.

Re: Setting category with sd_dataform

Josh, currently on SP15, previously on SP3. Setting Category worked on both

Terry
Mark O'Loughlin
Acclaimed Contributor.

Re: Setting category with sd_dataform

Hi Josh,

Sp 12 and it works fine. I think we also had this working on SP 5 (memory is a little off today). Can you post the paramters that you are using?
Robert S. Falko
Acclaimed Contributor.

Re: Setting category with sd_dataform

OK - so the problem is not related to the Service Pack.

Any ideas why I cannot set the category (or folder, for that matter) using sd_dataform (given that the same sd_dataform command is setting a lot of other fields) ?

-Josh
Terry A. Moir
Outstanding Contributor.

Re: Setting category with sd_dataform

Whenever something like this has happened to me, it's usually because I forgot a quote mark somewhere, or the + sign, or spelled the word wrong, or something like that. If you can post your string, I can try to replicate it...

Terry
Robert S. Falko
Acclaimed Contributor.

Re: Setting category with sd_dataform

Here is the command file I am using:

"%SD_CLIENTHOME%bin\sd_dataform" "Service Call" -ForceNew "+Status=Registered" "+Caller=%1" "+Medium=Auto" "+Service=Repair" "+Configuration Item=%2" "+Title=%3" "+Description=%4" "+Classification=RMA" "+Faulty CI=%2" "+Subcontractor=%5" "+RMA Status=New" "+Impact=None" "+Priority=5" "+Category=Incident" "+Calling for=%6"

Every field is correctly filled in except the Category. I am sure that the Category "Incident" exists. In addition, the tests I do have single words without space or new lines in the parameters.

By the way, if someone can show how, in this same command, to create the relation between this Service Call as a Subcontract call of another Service Call, I would be highly appreciative.

Regards,
Josh
Terry A. Moir
Outstanding Contributor.

Re: Setting category with sd_dataform

Josh,

Did you type in the string or cut & paste it? If the former, please resend using cut & paste. Also, please verify the category of "Incident" exists and is not blocked.
Robert S. Falko
Acclaimed Contributor.

Re: Setting category with sd_dataform

For security reasons it is impossible for me to copy and paste or to annex a file. But I am a good typist.

Yes, the category really exists.

-Josh
Gyula Matics_1
Acclaimed Contributor.
Solution

Re: Setting category with sd_dataform

Does it work, if you set only the category field and omit the rest? If yes, then try to change the order of fields.
Robert S. Falko
Acclaimed Contributor.

Re: Setting category with sd_dataform

It was the order of parameters. The category needed to be before the fields that depend on the category.

Thanks for the help,
Josh