- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2011 05:00 AM
I have an import, I want to add some scripts to and I start asking, how I can put various fields into the comment field.
So the idea is:
putting.
into one target field with a script 🙂 because the source data have 3 different comment fields (I hate it) and I need to get all of them into service now.
regards
Chrisian
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2011 07:10 AM
To add a line break:
answer = source.commentField1.toString() + "\n" + source.commentField2.toString() + "\n" + etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2011 07:01 AM
Try:
target. = source..toString() + source..toString() + source..toString();
Replace the items in <> with the correct field names and put this in a transform script in the transform map attached to your import. Or if you prefer to use a field map script, select the target field from the dropdown in the field map form and replace "target." with "answer".
answer = source..toString() + source..toString() + source..toString();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2011 07:04 AM
Sorry, where there are two .. there were supposed to be field names.
target.commentField = source.commentField1.toString() + source.commentField2.toString() + source.commentField3.toString();
or in a field map:
answer = source.commentField1.toString() + source.commentField2.toString() + source.commentField3.toString();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2011 07:10 AM
To add a line break:
answer = source.commentField1.toString() + "\n" + source.commentField2.toString() + "\n" + etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2011 07:12 AM
(removed redundant comment)