Append comments using transform script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 01:25 PM
I'm working on a transform script but I'm not sure how to do it. I'm updating the assets (alm_hardware table) when we dispose/retire the equipment. I'm coalescing on the asset tag# and it seems to be working. What I need help with is when it finds the record, it appends the order # to the comments. Not every record has something in the comments field, but if it does i don't want to lose it. Any suggestions?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 01:48 PM
Can you share how you are adding order # in comments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 02:36 PM
It is actually a field in the spreadsheet that we are using to update the assets.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 03:54 PM
on the transform you can do something like.
target.comments += u_order_number;
The += operator is short hand for target.comments = target.comments + u_order_number.
This will allow you to keep existing comments and add a order number if there is one.
Hope this helps!
-Joel R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2019 12:25 PM
Would you use this as an onBefore script or just in place of the transform mapping?