Update Condition filter field using datasource

Gowthami Senthi
Kilo Expert

Hi,

I have a requirement to upload data in a custom table which is having condition filter field.

I have tried to use DataSource and Transform map but was not able to update the condition field.

Eg:

Exported records form SLA table which is having Start condition and Stop condition fields.

Modified some data in the Excel sheet and then attached with the Datasource.

When I transformed the data all the records got inserted but condition field was empty. It was not updated with the condition.

Please advice. Thanks in Advance...!

4 REPLIES 4

Chuck Tomasi
Tera Patron

Can you provide some details and examples?



What is your transform map doing with the condition field?



Finally, for note: You might be better off exporting to XML to preserve all the data and types (including references fields and condition fields.) This works best with exporting complex data types (more than just strings and dates.) It might be a bit messier to edit, but it will preserve more information and integrity.



http://wiki.servicenow.com/index.php?title=Exporting_and_Importing_XML_Files


Thanks for your quick response.



For testing purpose I have tried it with Exported Excel sheet. But If i need to create new records with various values filled in the condition, is it possible via XML?


Screen Shot 2016-10-13 at 6.53.22 PM.png



Above attached is the fields available in the custom table. So I need to load few more records with different table name, description and conditions.


Except Conditions, other fields are getting updated via transform map.


Underneath, the condition field is really just a string. It's called an encoded query string. Simple example:



active=true^state=4^u_region=Southwest



Translates in to Active | is | true AND State | is | 4 AND Region | is | Southwest.



Let me do a little experimenting with exporting and importing them.


I just created a table with a table field and conditions field. I exported the two test records to XLSX then deleted them from the table. I created a data source from the attached XLSX and transform to map the name, table, and conditions fields back to the target table. Everything went as expected. Conditions were intact and operational.



Let me know if you need details on any one of the steps I did to see if we have a difference of execution.