Transform Maps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2023 05:19 PM
Hello everyone, In a Transform Map I want a field in the target table to remain empty. Should I achieve this by using a script like answer=""; or is it sufficient to simply not include the field in the Transform Map?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2023 05:43 PM - edited ‎09-11-2023 05:44 PM
To make this decision, you need to think about two scenario.
1) If you want that field empty when the record found in data source then you should add field in transform map so whenever record is found it will make that field empty.
2) If you are just seeking to make this field empty whenever inserting record then it's better not include the field in transform map data mapping.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2023 06:46 PM
Do not map the field at all in the Transform Map configuration, and it will remain empty during the transformation process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2023 08:57 PM
@yoli1 If it needs to be empty all the time when transform map runs then do not create the field map for that.
If the target field value is conditional then add the field map with script like below
if(condition){
answer = "";
}else{
answer = "SOMETHING HERE"
}
ServiceNow Community Rising Star, Class of 2023