Import linked fields

Is there a way to import fields involved in a link? When I attempt to import via the API or interactively, fields involved in links, either parent or child keys, are not populated. So far I’ve had to remove links before and re-add them after an import.

It also appears that parent data must be imported before any related child data that would populate a subtable. Is that the case, or is there a way to refresh subtable values after importing the parent records?

Are you referring to the linked field if link & load?
If so, since the linked field is one kind of selection (select from other sheet), you will need to first have the selection (import to the source sheet, which is the parent sheet in your case) so that you can import to the linked field (on the child sheet).

Yes, I the first paragrah I was referring to the linked fields in link & load that are the primary and child keys in the relationship. I can’t think of any reason to prevent the import of these values. This means that no data can be imported into tables involved in a link & load relationship.

Hi,

Would you please let us know if you are importing to a linked field with the value that is existing in the source sheet?
For example, if you are importing “customer number” (linked field of link & load from customer sheet) to Sale Order record, is the customer number you are going to import been created in the customer sheet before?

No, the child sheet’s “foreign key” (eg.“customer number” on Sales Order) may not exist in the parent (Customers) during import. I didn’t see anything in the import documentation about the enforcement of referential integrity, but it’s a very odd and frustrating way to enforce it by wiping out the foreign keys (“customer number” on Sales Order).

For instance, while setting-up some sheets with pre-existing data, I deleted and re-imported all of the records in a sheet that’s a parent. The foreign keys in 500k child records were wiped out.

So from your example, if a customer record is deleted, the customer number in the sales orders would be blanked, leaving no trace of what customer those sales orders had at one time been linked to.

Normally a database would either prevent you from deleting a parent that has children, delete the children as well, or simply allow orphan child records. I can think of not reason to blank foreign keys like this, especially when orphan child records are allowed when a link and load relationships is established after the parent and child sheets have been imported.

I understand that blanking out the customer number of sales order when the customer number is not found can be frustrating when doing the imports. However, we find it a little hard to find a better alternative as we technically cannot allow a customer number to appear on a sales order that does not correspond to any customer.

We’ve also thought about creating the customer automatically with only the customer number filled out. But was worried that this would inadvertently create tons of invalid records. Also thought about skipping the record as a whole when it has a field like customer number that cannot be mapped to a customer. But this also seemed a little too much if the sheet has tons of field not being able to import because of one unmapped field.

Would love to know about your thoughts on this, would either creating the customer automatically with only one field filled out be better, or not importing the record at all be better? Or maybe there’s another way that we haven’t thought of?