RTE Entity Mapping Conditional Script - Access input of ETL Entity which doesn't have Path field

Adrian Holodnak
Tera Contributor

I have RTE Entity Mapping:
Source Entity - ETL Entity of import set table which don't have filled Path field

AdrianHolodnak_0-1680608614313.png

Target Entity - ETL Entity of staging table

AdrianHolodnak_1-1680608671905.png


I want to have a conditional script for RTE entity mapping from source entity to target entity. In the script, I want to access the input (source fields), but I don't know how due to the absence of a Path field on the source entity (by the way, the source entity cannot have a filled Path field, otherwise the robust transformer won't work). My goal is to check if a particular field on the source entity is filled, and if it is, then I want to put the other RTE entity mapping to the state of ignore (because "Target entity:c5cd4cf91be52910fab8caa4604bcbc1 cannot be the target of multiple entity mappings" -> Sys ID of Staging entity). I know that this functionality can be achieved via 'on Before' and 'on After' Script to check every single record, but it's inefficient.

AdrianHolodnak_2-1680609349881.png

 

1 REPLY 1

Clarkie1
Giga Expert

That must be why SN recommends the temp entity model for RTE - you use a temp entity and then conditional script from that to the actual tables


https://docs.servicenow.com/bundle/tokyo-platform-administration/page/administer/import-sets/concept...