RTE Entity Mapping - Robust Transform mappings

Deepak75
Tera Expert

Hi All,

 

I am working on robust transformation and faced an issue while loading data with it.

Can we load an entire row data into different tables using a conditional script in entity mapping.

For eg. I have 4 rows in sheet. I need 2 rows go into table A and 2 rows to table B based on a field say state. If State is open row should go to Table A, and if it is closed it should to Table B.

Did someone worked on some similar requirement using robust transformation ? Please help out here.

 

Thanks and Regards

4 REPLIES 4

harun_isakovic
Mega Guru

In the transform map, field mapping scripts you should be able to script this

example

if (source.u_state == "A") {
//do something
} else if (source.u_state == "B"){
//do something else
} else {
//do something else
}

https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/import-sets/reference/r_FieldMapScriptVars.html

Thanks for the response Harun. But isn't working in robust transformation. I have tried this already.

Clarkie1
Giga Expert

I am working on similar setup currently - I believe the temp entity model should work, but will advise once I get it working
https://docs.servicenow.com/bundle/tokyo-platform-administration/page/administer/import-sets/concept...

Angelo Cortesi
Tera Contributor

Please, let's revisit this topic until we get it working."

 

I have the same RTE requirement: One Excel sheet 'as datasource' must go to multiple classes according the excel field value.  The Is Conditional script returns.  Transfomation failed:
Could not find value for one or more symbols used in query condition. Transform rule order for symbol used in query condition should be less than the order for this transformer rule.
Could not find values for symbols: [staging.type]

 

I saw several different scritps..I tried all.  None works.   I appreciate yout help please. 

Thank you.