- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 06:44 AM
Hello,
I need to implement the import of external data into two ServiceNow tables with relations between them like groups and users. In other words items from the second table are members of items from the first one. Now I'm trying to figure out the best way to do this.
The question is if I can achieve my goal with Import Sets?
More specific: If I create the third table keeping the membership between two import set tables is there a way to keep this relation after loading all the data into main tables?
What is the best practice for implementing such tasks?
Thanks in advance!
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 07:54 PM
Can an item in Table 2 belong to more than one item in Table 1?
If so, then you do want 3 tables.
Table 1
Table 2
Table 3 = many to many table with a reference field to each table.
During your import, you can use an onAfter Transform Script to create the entries in Table 3. I find this article helpful with building Transform Scripts
http://www.john-james-andersen.com/blog/navigating-transform-scripts-in-servicenow.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 07:54 PM
Can an item in Table 2 belong to more than one item in Table 1?
If so, then you do want 3 tables.
Table 1
Table 2
Table 3 = many to many table with a reference field to each table.
During your import, you can use an onAfter Transform Script to create the entries in Table 3. I find this article helpful with building Transform Scripts
http://www.john-james-andersen.com/blog/navigating-transform-scripts-in-servicenow.html