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

Create Locations (with relations) during import

Highlighted
Mathias Byrö
Regular Collector

Create Locations (with relations) during import

Hi there!

As we are starting to launch SD for our users, we ran into some problems when we tried to import locations.

Our wish is to have the locations like this:
Parent: [CITY] Child: [BUILDING]
Parent: [BUILDING] Child: [FLOOR]
Parent: [FLOOR] Child: [ROOM]
e.g. in the following hierarchy: [CITY]-[BUILDING]-[FLOOR]-[ROOM].

Everything would have been fine if every argument were unique but it surely exists floors in more than one building!

I have followed the documentation "Importing Data With Relations" but it doesn't seem to work for me.

I'm really keen of getting this to work because we have A LOT of buildings!

Thanks in advance!
6 REPLIES
Robert S. Falko
Honored Contributor

Re: Create Locations (with relations) during import

Mathias,

Before you go any further, think about the implications of entering a location for a CI or a person. If you have a lot of locations that are all named the same way - for example, "Floor 1", then your poor data entry person will have a lot of difficulty finding the right "Floor 1". If you have a lot of locations, they will have to scroll through the location hierarchy every time.

For this reason, we decided to give unique names to ALL our locations, no matter what level in the hierarchy. It makes data entry much easier - which means you will probably have higher quality data (unless, of course, you are doing data entry via barcode readers).

Once your locations are unique, your data import problem is solved.

-Josh
Mathias Byrö
Regular Collector

Re: Create Locations (with relations) during import

Hi Josh and thanks for your reply!

Our thought was that we should give the [ROOM] a unique name in the format [BUILDING-FLOOR-ROOM]. In that way the [ROOM] itself is unique.

When we manually create a new CI, we thought the simplest solution would be by simply enter [BUILDING] + "-" + [FLOOR] in the Location field. You will then get a list of unique [ROOM]s for the specific floor in the building.

But, as you said, there will be problems during import!

I realize now that we must create unique names in every level in the hierachy.

In which format did you name the different levels?

Perhaps we could name the different levels like this:
Building: [CITY]+"_"+[BUILDING]
Floor: [CITY]+"_"+[BUILDING]+"_"+[FLOOR]
With this format all levels would be unique, but it would result in very long names, so all suggestions is welcome!

I suppose you still have a hierarchy?

The only reason we want to have a hierarchy is that we want to create reports containing information about all registered people, printers, computers etc. for a specific building, floor or room.

Thanks in advance!

/Mathias
Robert S. Falko
Honored Contributor

Re: Create Locations (with relations) during import

Mathias,

The reason we have a hierarchy is to be able to aggregate data (CIs or Service events) based on arbitrary levels in the location hierarchy. This requirement is quite separate from the operational requirements of finding a CI in order to change or repair it.

For this reason, the Search codes for every location except except the bottom level does not need to be user friendly; it just needs to be unique. Furthermore, we use the Remarks field to create a user friendly name of the location for reporting purposes.

So I think we have very similar requirements.

-Josh
Mathias Byrö
Regular Collector

Re: Create Locations (with relations) during import

The (obvious) solution was to create a unique name for each level in the hierarchy, just like Josh said earlier in this thread!

(The next problem will be to figure out how to import data with relations..)

Thank you Josh, I really appreciate the time you spent helping me out!

/Mathias
Robert S. Falko
Honored Contributor

Re: Create Locations (with relations) during import

Mathias,

Perhaps not the most elegant way to import the data, but try doing it iteratively, starting with the top level. When you import any data at a lower level, include the Parent code, which should have been created already.

-Josh
Mathias Byrö
Regular Collector

Re: Create Locations (with relations) during import

Thanks again Josh! It worked lika a charm!

/Mathias
//Add this to "OnDomLoad" event