Choice action ignore in transform map not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi, I'm currently working with a transform map. I have field mappings which target fields are choice field type. I used scripting and direct mapping (field to field). Upon transforming, it still pushes the incorrect value to the choice field. For example, OS field has pre-defined selections. On my test data, I input "test" in the OS column on the file. Since choice action is ignore, it should leave the field as blank or should create new choices on the field, right? But currently, it is creating choices.
Anyone encounters this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Ignore means not add the choice value to system choice table but import as string to target table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @Vee Jay Recana ,
Ignore should skip invalid choice/reference values but still insert or update the record. Use Choice as Reject to prevent record insertion entirely.
** Always remember:
Ignore − skips the source value if it's not already defined in the target’s valid values, while still processing the rest of the record
Create − will add new choice or reference entries if the source value doesn't exist
Reject − skips transformation of the entire record if the source value is invalid for that field
If you find this helpful, please accept this as a solution and hit the helpful button..
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Thank you for this. But reject restricts entire row being inserted to the table, right? In our case, we don't want that to happen. We just wanted to avoid adding new choices to the choice field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
ignore indicates don't update the target choice field.
2 approaches
1) use return '' if the incoming value doesn't match with the target choice
OR
2) handle this completely in onBefore transform script and set value only when match found
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader