Yeah, so. I made an example Excel with buckets on one tab and material on the other (see attached). And as a learning exercise I want to import the relationships from the Excel between the two. My current procedure works, but it's a bit entangled I'd say. Can you help make suggestions to make it better?
This works, but I'm also stuck with both a Material (string) and a MaterialId in my Buckets which I need to clean up afterwards. Can I import the Buckets directly with a direct ID based (long int) to Materials table?
(And yes, I studied https://www.outsystems.com/forums/discussion/46375/import-excel-for-two-entities-with-relatioship/ intently, but didn't crack the code yet)
Hi Soren,
You could import Materials into a table called Material as a first step.
In a second step you would import Buckets to a table called Bucket. While iterating the excel lines for each Bucket you should loop over the table Material where the Bucket Material Name (from the excel) equals the Material.Name (from the table created in step 1) to get the foreign key to populate the attribute Bucket.MaterialId in order to be equal to the Material.Id. The action Create_Bucket should be called only after this.
Regards.
Hi Soren
In addition to what Hugo suggests, you can check the oml attached.
Regards
Gonçalo Almeida
(I'm documenting this a bit more explicitly to make this thread more valuable for people finding it in the future)
Your solution is a good example of doing this. What you do is:
This effectively avoids storing temp columns in my database. Solved!
(Goncalo's drawing for reference)