Service Desk Practitioners Forum
cancel

Location problem in import

Highlighted
Mathias Byrö
Respected Contributor.

Location problem in import

Hi!

Is there by any chance possible to add a location during an import?

I have got some printers wich is located at Location1, Location2... but i really don't want to manually enter this information before I do an import. (I have many printers in many locations!!!)

By the way, is it possible to concatenate two or more import fields into one field in SD? eg. add IP-address, MAC-address and Comments into the Remark field during import?

Best regards, Mathias
5 REPLIES
George M. Meneg
Acclaimed Contributor.

Re: Location problem in import

Hello,

About concatenation, this is possible at least for concatenating fixed string value with another. For example in a configuration file (the db is oracle) I have the following line:

COLUMNS='C'||[CUSTOMERS].[CUST_REF] as [SEARCHCODE]

I assume that

COLUMNS=[TABLE_1].[FIELD_1]||[TABLE_2].[FIELD_2]||... [TABLE_N].[VALUE_N] as [REMARK] will do the trick. I haven't test it and I don't thing that this will work on an SQL Server.

menes fhtagn
Mathias Byrö
Respected Contributor.

Re: Location problem in import

Hello George and thanks for your reply!

Unfortunantely it didn't work because I'm using an MS Excelsheet as source... I get an error message claiming it doesn't recognize the '||' signs...

Actually, I can't really say that I've ever seen this kind of syntax, with concatinating with ||, I assume it's an Oracle thing!?

Any other suggestions is appreciated!

Thanks, Mathias
Mathias Byrö
Respected Contributor.

Re: Location problem in import

I managed to fix the concatenation by simply write [METAFRAME]+' '+[KOMMENTAR] AS [REMARK]in the COLUMNS field, and then relate to [REMARK] in the ATT field!

New problem arise all the time... is it possible to add a line break in the ini-file? I've read some posts about this subject, but it doesn't seem to apply to me!

I've found out that it's not possible to write like this: [METAFRAME]+'\n'+[KOMMENTAR] AS [REMARK], because \n will appear in the text. I have also tried {CRLF}, chr(13);, %line.separator%, \r,
,

, but none of the above works. Any suggestions?

Thanks in advance, Mathias

Mathias Byrö
Respected Contributor.

Re: Location problem in import

Well, I manged to solve the location issue by simply import the locations first, and after that do the actual import of printers. Not the cleanest solution, but it works!

I'll post a new thread concerning line breaks.
Mathias Byrö
Respected Contributor.

Re: Location problem in import

Please look for the solution(s) in the previous threads!
/Mathias