RTE Entity Operations - Is Conditional?

Wayne Miller
Tera Guru

We have ivanti integration to import assets into our CMDB.  We have a daily Scheduled Import which runs overnight, one for Servers and one for Computers.

 

The import works by connecting to Ivanti SQL Database view via a mid server, and pulls data into a temporary table to run the transform.

 

Now, one of the fields which pulls is u_emailaddress, this is the email of the last user of a computer, and more often than not this is the user to which this asset is assigned.

 

This is an example of the data record in the temporary table:

WayneMiller_1-1706801235451.png

 

So we have an RTE Entity Operation in the Transform which performs a Glide Lookup on the email address, and returns a sys_id of a user record in ServiceNow to populate the "assigned_to" field.

 

WayneMiller_0-1706801157778.png

However, we have an issue whereby if the u_emailaddress is blank, the Glide Lookup still fetches a user Sys_id. 

WayneMiller_2-1706801401912.png

 

So we're getting a random user (the same one) allocated anything which didn't have an email address.

So my question is, I'm not quite sure how "Is Conditional" works on this Operation, as what we would like it to do is either not run this operation if the email address field is empty, or better yet, if the email address is empty, then return a specific sys_id of a placeholder user we can create.

 

Is there any way to achieve this?

 

3 REPLIES 3

andy_now
Tera Contributor

I couldn't get it working but I found some official docs and a reference to a screenshot example which was awfully low quality. If anyone can get it working update the thread with an example.

 

https://www.servicenow.com/docs/bundle/yokohama-integrate-applications/page/administer/import-sets/t...

 

Which said

Conditional ScriptCondition specified as a string. For an example of a conditional script, see Temporary entity model.

 

That linked to:

https://www.servicenow.com/docs/bundle/yokohama-integrate-applications/page/administer/import-sets/c...

 

Conditional script

In some cases, you might not want to insert or update all the input data to a target table. You can use a conditional script to pick which import set rows to map to a target entity. In the following example, the Temp to Member RTE entity mapping uses a conditional script to specify which rows to map from the Temp entity to the Member entity. Only rows with a type of member are mapped to the Member entity.

andy_now_1-1753347897887.png

 

ARUNA NADAGOUNI
Tera Contributor

@Wayne Miller 

I set up the GlideLook up operation same as you 

ARUNANADAGOUNI_0-1756644262931.pngARUNANADAGOUNI_1-1756644286249.pngARUNANADAGOUNI_2-1756644335224.png

 I used the snumberSysID to map to target snumber reference field which I used in GlideLookup operation to store the SysID. It is not mapping the sysid to the target field. What am I missing? can you help me with this?

ARUNA NADAGOUNI
Tera Contributor

@Wayne Miller  

 

I set up the GlideLookup operation same as you please look the images below. Even then the SysID is not mapping to the Taget reference field. What am I missing here? Can you help me set up ?

ARUNANADAGOUNI_0-1756644604013.pngARUNANADAGOUNI_1-1756644627542.pngARUNANADAGOUNI_2-1756644644419.png

for better understanding you can view this community Question

 https://www.servicenow.com/community/cmdb-forum/robusttransformmap-string-field-mapped-from-temp-to-...