The CreatorCon Call for Content is officially open! Get started here.

how to ignore inactive records on target table before an import.

chucksimonds
Kilo Expert

Is there a way to ignore inactive records on the target table before matching the records? Using an onBefore script to ignore inactive records ignores the inactive record, but also it ignores/drops the source record so it is not available to match on an existing active record. I would like to ignore the false record and still match on the active record. Is it possible to use a script/query to only pull in (process) the active records on the target table? Thanks!

13 REPLIES 13

Pretty clever!   When I get time to play, I'll try some of your ideas and update this thread. Thanks again!


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Chuck Simonds,



I am assuming you want to ignore all inactive records from source table(i.e staging table). However I am not sure what you mean by " but also it ignores/drops the source record so it is not available to match on an existing active record". Can you please explain it in more details.


Transform Map Scripts - ServiceNow Wiki



Sample script to ignore records from processing.


if(source.u_active == 'false'){


ignore=true;


}



Please let us know if you are blocked.




Want to ignore all inactive records on the target table before trying to match records during the transform.


Did you succeed with this? I have a very similar situation in my users table, with some accounts that could be targeted by a transform map, but should be ignored for other reasons. It seemed to me like a perfect use for a custom reference qualifier...as in "don't allow selection of this user as a reference, unless it matches some criteria."



But I tried it and found that reference qualifiers don't work during imports--the first match wins. Did you reach your goal of filtering Inactive users out as import targets, while not affecting the source so that it could proceed on to the good match?