
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-24-2022 04:46 AM
I have an existing transform from a server, populating location data.
I have added a new field u_created_by_workday which is a Boolean field.
I would like the transform to set this value to true if the record exists in the source. If it doesn't then to ignore.
I'm thinking I might need to do this via a before script? Or is doing it via a field map script ok?
Could someone please help with the script and which method to use?
Many thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-24-2022 04:55 AM
Please use "Source Script" with the logic which return true if the location existsin table cmn_location else return false. (Please make change as per your need/requirement)
var tableGr = new GlideRecord('cmn_location');
if (tableGr.get('name', source. < fieldname > )) {
return true;
}
return false;
For your reference
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-24-2022 04:55 AM
Please use "Source Script" with the logic which return true if the location existsin table cmn_location else return false. (Please make change as per your need/requirement)
var tableGr = new GlideRecord('cmn_location');
if (tableGr.get('name', source. < fieldname > )) {
return true;
}
return false;
For your reference
Thanks & Regards,
Vasanth

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-24-2022 05:24 AM
Perfect, thanks for your help