Insert for Transform map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 09:39 AM
hi all
i have a transform map where i have a coalesce field.
I want to only update records if coalesce is true
No insert if no match
provided the below script on the Run Script on the transform but its still inserting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 09:45 AM - edited 11-13-2023 09:48 AM
Write an onBefore transform script
var gr = new GlideRecord('your_table_name'); // this one is your target table
gr.addQuery('number', 'xxxxx'); // here your coalese field name
gr.query();
if(!gr.next()){
ignore = true;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 09:56 AM
Still inserting. tried this too
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 10:22 AM
Can you please share your code
var gr = new GlideRecord('your_table_name'); // this one is your target table
gr.addQuery('number', source.u_number); // here your coalese field name
gr.query();
if(!gr.next()){
ignore = true;
}In line 2 are you bringing your importset field name. Also make sure is there any other script on After or on before with different condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 10:06 AM
