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

Data exchange and a 255 custom field...

SOLVED
Go to solution
Highlighted
Kevin M. Jacobs1
Super Collector

Data exchange and a 255 custom field...

Hey,

Is it possible in Data Exchange to import

FIELD1,FIELD2,FIELD3
This,is a,test

into a single 255 custom field as either

This is a test
or
This
is a
test

I have not tested it, but have been asked to create a "dumping ground" field for data that is not needed today, but will be implemented in a later project for Service Desk.

Thanks in advance,

Kevin M. Jacobsen
7 REPLIES
Gyula Matics_1
Honored Contributor

Re: Data exchange and a 255 custom field...

Yes it is possible.

The export .ini file really just specifies SQL queries. So in the [COLUMNS] line, you can use the syntax of your database server to concatenate the 3 fields into one. Or make any other data transformation.
Michael Lutfi
Frequent Visitor

Re: Data exchange and a 255 custom field...

if you are limited to only three fields then a quick solution would be to setup three text fields and make a DB rule when all three exist then update the 255 custom field with the concatenation of all three...
************
I have just tested on my dev. environment, here is what the rule will look like:

When sr / inc is created or modified
where surveycomment5 (*) is anything
AND survey comment 7 (*) is anything
AND survey comment 8 (*) is anything
Concatenating three text fields (Update Data) Information set to (Concatenate [surveycomment5] With (Concatenate [survey comment 7] With [survey comment 8]))

Notice since you can not have a huge list of fields to concatenate you use the second field of the first as a call to function to concatenate the 2nd and 3rd.....


is this what you were asking about???
Michael Lutfi
Frequent Visitor

Re: Data exchange and a 255 custom field...

Hey Gyula,

With a few seconds apart with our replies :) interesting idea I forgot that it can be done. I have not done it myself before but I would be interested in a small sample how to do it in the .ini file :)

Kevin M. Jacobs1
Super Collector

Re: Data exchange and a 255 custom field...

I also am very interested in the option that Gyula Matics spoke of. That would be the most simple method for me. Custom fields are a rare (or difficult to find) and I wouldn't want to waste some by using them for weekly imports.

Oh, maybe that is the other thing I should have stated... This will be a weekly feed. Can I still use the delta processing on the 255 field if I'm merging things in via the ini?

Thanks,

Kevin M. Jacobsen
Gyula Matics_1
Honored Contributor
Solution

Re: Data exchange and a 255 custom field...

take a look at the default ini files that comes with the client. Radia.ini, NNM6.ini, ITSM*.ini has some rather complex examples.

The basics:

[SOMECLASS]
SOURCE=SOMETANLE
ATT=[ALLFIELDS]
COLUMNS=SUBSTR(CONCAT(FIELD1,CONCAT(FIELD2,FIELD3)),1,255) AS ALLFIELDS

This will concatenate fields1..3 into ALLFIELDS, and limit the length to 255 characters. Then in the import map you can link allfields to some sd field.
Gyula Matics_1
Honored Contributor

Re: Data exchange and a 255 custom field...

..and yes, you can still use delta processing. That is because the xml will only contain the merged field, which is no different from any other normal field.
Kevin M. Jacobs1
Super Collector

Re: Data exchange and a 255 custom field...

Thanks for the quick replies. Great info in a very fast manner.

Kevin M. Jacobsen
//Add this to "OnDomLoad" event