Prevent create referenced record on import.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2016 08:42 AM
Hi All,
I have two custom tables that reference each other and one spreadsheet that holds all the information for both tables. When I do an import (excel) to either of these tables, new empty records are created when a reference field is populated and a record in a referenced table doesn't exists. Is there maybe an out of the box way to prevent this from happening? I was thinking of scripting it to populate information in a reference table but maybe there is other way to do it?
Cheers
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2016 08:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2016 09:18 AM
Hi Rahul,
Thank you for quick response. Do you know a way to actually populate the field and prevent a record from being created or scripting will be the only way here? I'm thinking of populating the related record with information - which I have in the same spreadsheet - and use future imports only on one table. Using ignore will leave the field blank and it leaves users to select those values manually. With hundreds of records that is too time-consuming.
Cheers
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2016 10:11 AM
There are three possible ways in my view:
1 - load the data for the related referenced table and then load into this table.
2 - Instead of ignore set choice action to create and set the field for "reference value field name" in the field mapping
3 - Create the reference record in the transform map scripts from the source data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2016 04:41 AM
Hi Rahul,
Thanks for the hints.
I have tries setting the values through the reference field but it didn't work even though I saw them set up in the logs.
Before I tried to create a new reference record I realised I can use onForeignInsert transform script as it seems it should do what I want but it seems to not run. I am checking it with log.info and gs.log but nothing comes through. Whould you know of any reason why transform script doesn't run? I have only that one script at the moment.
Cheers
Greg