Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Code List Import?

SOLVED
Go to solution
Highlighted
Peter Dent
Frequent Visitor

Code List Import?

Hi,

Is it possible to import a list of items to populate a code list I have created in SD 4.5, SP17.
12 REPLIES
George M. Meneg
Honored Contributor

Re: Code List Import?

Yes it is through Data Exchange. The only exception is Generic Relations and Generic Relations Groups that though they appear under Codes/General are entirely different entities and due to OVSD internal design not able to be imported through Data Exchange.
menes fhtagn
Peter Dent
Frequent Visitor

Re: Code List Import?

Thanks George but, how?

The code list is associated with CIs. So if I create a form for the code list, it has to contain all the mandatory fields of a CI and they have to have values but you can't just import values into code lists anyway...

So how do you do it?
Ruth Porter
Honored Contributor

Re: Code List Import?

Hi Peter,

I am not sure what you eman when you say you cannot import code lists; if you importing a CI and you include a code list value that is not defined, it puts it in for you; in fact one of my first attempts years ago I ended up with a whole load of values I did not want!

If you want just to take in the code, first set up a template for the code; then create an import mapping using this template.

Hope this helps, Ruth
http://www.teamultra.net
George M. Meneg
Honored Contributor

Re: Code List Import?

Hello Peter,

Code is an entity. So you can import values for codes just the same with almost any other entity. If the codes are linked to CIs then in your import mapping first you must import the code values and then the CIs.
menes fhtagn
Peter Dent
Frequent Visitor

Re: Code List Import?

Ruth, George,

What I'm trying to import is a list of software titles, into a code list called ProductName.

I've created the xml file, the import mapping and the data exchange task.

At the moment the code list is completely empty.

I created a template, into which I set some values to satisfy the mandatory fields.

The xml file therefore only contains the entries for the code list and the Searchcode field.

When I run the import I get an error for each record in the xml file, (see attachment), because the ProductName doesn't already exist.

In all the imports I have done, where the entries in the xml file are mapped to a code list, have to match exactly and existing entry. If not the data is excluded from the import.

The other problem I have with this, (if it worked that is), is that I would be created a CI for each of the entries in the code list, which I would then have to delete.

But that's another story, seeing as how I can't get the import to work.

Is there something I'm doing wrong or a parameter that needs to be changed?
Ruth Porter
Honored Contributor

Re: Code List Import?

Hi Peter,

Can you post details of your import mapping, ini file and the source spreadsheet

Regards, Ruth
http://www.teamultra.net
Peter Dent
Frequent Visitor

Re: Code List Import?

Ruth,

Here's a document with the ini file and details of the import mapping.

I wasn't sure exactly what format would be best for the import mapping details?
Peter Dent
Frequent Visitor

Re: Code List Import?

And here's the spreadsheet...
Ruth Porter
Honored Contributor
Solution

Re: Code List Import?

Hi Peter,

I see your import mapping is for configuration Item: you might find it better to take the code items in separately with an import mapping to the code.

See the attached which is one of mine with the maes changed; my code is called TESTCODE and is a custom code field on a CI

Hope this helps, Ruth
http://www.teamultra.net
Peter Dent
Frequent Visitor

Re: Code List Import?

Ruth,

You that feeling when the light suddenly dawns......

Yes, of course, I see what George meant now about being an entity itself and you not understanding why I can't just import into the Code list.

I've been trying to do it as part of a Config Item....DOH!

I'll try that out tomorrow and award points no doubt.

Peter
Ruth Porter
Honored Contributor

Re: Code List Import?

Hi Peter,

Don't say "DOH!" - in my opinion it is logical but not intuitive and I was shown by a master (Mr Bush)

Regards, Ruth
http://www.teamultra.net
Peter Dent
Frequent Visitor

Re: Code List Import?

Yes, Ruth, George,

Its obvious when somebody points it out...

The code list created is an entity in its own right and a template + Import Mapping can be created for it and then of course a Data Exchange Task.

Thanks, sorry I didn't pick up on what you were both trying to tell me earlier.

It works fine now thanks.
//Add this to "OnDomLoad" event