The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Exchange problem/question

SOLVED
Go to solution
Highlighted
Bertels
Super Collector

Data Exchange problem/question

Hello,

i have a question about importing data:
i have a column that i want to import [Status] in a csv file

this field consits in syntax Status\Substatus
for example: "Active\Operational"

Now what i want to do is define in the ini file a command that can filter out these 2 states and put them in the right field in service desk who is "Status" and "Sub-Status":
i tried to do this with CHARINDEX (to lookup the '\') but apparently this command isn't recognized by Data Exchange

the part of the data Exchange ini file:

ATT= \
[Status], \
[Sub-Status], \

COLUMNS=
sub_string([Status], 0, CHARINDEX('\', [Status])) as [Status], \
sub_string([Status], CHARINDEX('\', [Status]), 20) as [Sub-Status], \

Thx in advance

Steve
2 REPLIES
Vasily Kamenev
Honored Contributor
Solution

Re: Data Exchange problem/question

HI
remove ',' from "[Sub-Status] \" and from "...as [Sub-Status] \"

Vasily
Peter Dent
Frequent Visitor

Re: Data Exchange problem/question

Hi,

You could achieve this in the Import mapping file.

When mapping the field from the XML file to the field in the table, click the Values button.

n the bottom left field enter or copy the exact value from the XML file, in the bottom right box choose th actual field value you wish to map it to.

* NOTE

I beleive I am correct in saying that if you use a value mapping in this way then ALL values you want to import in this field must be mapped this way. So its either non or all of them.

Please can somebody confirm that assumption.

Hope this helps, Peter.
//Add this to "OnDomLoad" event