Please give a brief as to what is choice action in transform map

sub2
Kilo Contributor

Please give a brief in simple language as to what is 'choice action'   in transform map and what does each of its value signify -create , ignore,reject.

3 REPLIES 3

Shishir Srivast
Mega Sage

It has all the required information which you are looking for with clear explanation. please check.


Set choice action in the LDAP transform map


scott barnard1
Kilo Sage

Hi Shilpa



There are docs over at docs.servicenow.com that cover this better but



This field is available if the target field is a choice list or reference field. ( ok so you are transforming imported data into a table and some of the values may be reference values or choices) - forget the other types etc.



This field specifies what to do if the import set contains a reference or choice value other than those available. Select one of these options:


  • create: Create a new choice or record in the reference table.
  • ignore: Ignore the new value from the source table.
  • reject: Skip the entire row (record) containing the new value and continue to the next row.


So an example I have 800 retail outlets in my organisation and they have cost centres, site ids, dept and users against them as well postal address lat an longitude, contact etc.



I am importing users from AD via LDAP and they have locations. AD is notorious for having poor data quality folks just don't use templates like they could etc.



So If I am not careful I am going to import a load of bogus records into the location table



So In my transform map for the LDAP import to the sys_user table field of location I set the choice action to ignore.



It will update the rest of the record, but it will not add a bogus record to the location table. If it matches it will add the location.



If I chose create it would create a new record on the location table for every variant from the import.



Think of Park Road, it could be Park Rd, Pk Road, Pk Rd etc. You don't want rubbish on your location table,



If you chose reject it would not update the record at all.



So depending on your scenario you need to choose what action you want


This answer is more clear than the documentation.  Unfortunately it seems to confirm that there is no option for our requirement.  That is, "ignore" writes no value to the field when it does not match an option in the reference table.  We need to be able to write the import value, but NOT create a new option in the reference table.  Does Servicenow really not have such a simple capability as to have a value in a field without making a whole other entry in another table that then affect all other capabilities linked to that table?  Rather extraordinary if that's not possible in a product this old and complex.