- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 01:56 PM
Once the data is loaded and transformed using Transform map, I need to validate if all the fields are mapped.
Below is the sample data
Name | Description | Assigned to | Location |
Costa | Test description | Andrew Och | |
Admond | Test description | Atlanta | |
Flora | Test description |
I need to ensure the 2 reference fields 'Assigned to' and 'Location' is mapped in target table once the data transformation is done.
I have written two OnAfter transform scripts like this:
1.
2.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 02:01 PM
Hi @Suggy,
It's because you are overwriting the value, not appending to it.
Why not have a single onAfter script and use something like below:
status_message = [];
if (target.u_assigned_to == '')
{
status_message.push('Assigned To field is not mapped');
}
if (target.u_location == '')
{
status_message.push('Location field is not mapped');
}
status_message = status_message.join('\n');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 02:01 PM
Hi @Suggy,
It's because you are overwriting the value, not appending to it.
Why not have a single onAfter script and use something like below:
status_message = [];
if (target.u_assigned_to == '')
{
status_message.push('Assigned To field is not mapped');
}
if (target.u_location == '')
{
status_message.push('Location field is not mapped');
}
status_message = status_message.join('\n');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 02:13 PM
Hi @James Chun Yes that works. Thank you soo much 🙂