Hello
Using Import File Type I’m looking to relate each record created to several records in a related object via data passed to a single mapping, I was wondering if this is possible? Or can Import File Types only relate a single record for each mapping?
Long version:
I have data to import into Create via a CSV from our waste partner, a set of records of street bins including collection days. Some bins are collected once a week, others are collected several times.
Collection days have unique IDs, these are listed are for each Bin record as a single field of delimited values. So an entry in the CSV might look a bit like this, with the unique ids for Days delimited by a pipe
dog bin, corner of something street, 61af93501554c242f|61af901554c243c|5d442708066b93, something else, something else
I have an object for the Bin records, and I have an object acting as a lookup for the Days with title and unique ID for each. The Days object will be used elsewhere. These 2 objects are related as Many to Many.
On import I wish to generate a relationship between a Bin record and each of the relevant entries in the Days object, using the unique IDs.
I was wondering if this can be achieved with Import File Types, perhaps by passing the data correctly through a pre-processor? I experimented with returning Day ids as an Array just to see what would happen, safe to say that Create didn’t like that
Or do I need to go another way and maybe build an import widget to handle it all in code?
Thanks!