- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2016 07:59 PM
i want to transform (source.description) data which is in this format:
1. Click Website, 2. Enter Login Information, 3. Click Login, ...."
Into an HTML field (target.u_description) in this format:
1. Click Website,
2. Enter Login Information,
3. Click Login"
I tried this in a "Script Background" as follows and it works, I am not sure how to use it in a transform map:
var str = " 1. Click Website, 2. Enter Login Information, 3. Click Login";
var na = str.split(",");
for (var i = 0; i < na.length; i++) {
gs.print(na[i]);
}
Help appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2016 09:33 AM
Hi Minaz,
You might want to try using a script for the source on your transform entry with something like this.
answer = (function transformEntry(source) {
// Add your code here
return source.description.split(",").join("\n"); // return the value to be put into the target field
})(source);
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2016 06:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2016 07:38 AM
You are right. It worked for me as well.
Thanks for your Help.