- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2014 07:21 AM
I have a data source and transform map which automatically creates assets from an email with an XLS attachment. The asset creation is working by adding assets to the alm_hardware table. The columns on the spreadsheet are filling in the serial_number, po_number, u_order_number and invoice_number.
My issue is that I need to fill in the following Target fields and I cannot figure out how.
Source | Target | ||
---|---|---|---|
u_chassis_description | |||
| |||
u_order_date (mm/dd/yyyy format) | purchase_date (yyyy-mm-dd format and Dictionary info is alm_hardware.purchase_date) |
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2014 08:45 AM
This could be not as bad as I thought. It looks like each one is always the same, just not exactly what you have in ServiceNow. Try something like this:
// Set the model (must be a String or will not match the cases)
switch (source.u_chassis_description.toString()) {
case 'Opti 7010 (USFF)':
answer = 'Dell Inc. OptiPlex 7010';
break;
case 'Opti 9020 (USFF)':
answer = 'Dell Inc. OptiPlex 9020';
break;
case 'Latitude E5540':
answer = 'Dell Inc. Latitude E5540';
break;
case 'Latitude E7440':
answer = 'Dell Inc. Latitude E7440';
break;
default:
answer = '';
}
Let me know if that worked and if you find it working for some but not all of your data. If you have more things that need to match up, you can add more case, answer, break statements above the default section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2014 09:52 AM
Shawn,
I'm telling my mom, I'm telling my dad; that your answer is super rad!