If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#53700 by ask180
Wed Apr 08, 2020 11:53 pm
Assume I have two business objects named Idea and Task. They have a one-to-many relationship (one Idea may have zero or more Tasks, and each Task relates to one Idea).

I want to export the data from these two business objects, and import them into a duplicate bsv, maintaining relationships etc), and I want to do this as a process (rather than Export/Import one BO at a time).

The data export works fine. All the columns and all the rows are exported to appropriate csv files.

I can get Idea data to import, but Task data won't because the export has the shortcut to Idea as a column, and this throws an error. I would have thought that the IMPORT function would know to ignore shortcut columns as they don't have data.

I have searched the forum, and read the documentation, and have tried all combinations of everything, but the error remains.

Is there a trick to importing data into a business object that references (owned by) another business object?
#53702 by PointsWell
Thu Apr 09, 2020 2:16 am
If you were doing it manually you can use a reference to the owning BO

Idea has
ID - unique

Task has

The CSV for Task would have as a column

Task.ob_Idea.ID, Task.Title, Task. Etc

When you load the CVS for tasks it will find the Idea by reference number and then build the link,

You don't need to use ID, you can use any attribute of Idea as long as it is unique - if you use non unique columns then it becomes problematic.

Also you need to load your BOs in the correct order. If you load Task before Idea it will create a bunch of empty records with the the ID (or other unique field that you used) and no other data.
#53703 by ask180
Thu Apr 09, 2020 2:57 am
Thanks for your reply.

The problem is that when I export Task business object from a process (not the menu option Export), it includes a column for the Idea shortcut for some reason, and I can't find a way to stop it doing this. When I attempt to import the data, I get an error saying that it can't import shortcut fields.

When exporting by rules, how can I stop the process exporting the shortcut columns? I tried using a query, but it exported all the columns irrespective of what columns I had displayed in the queue.

I will keep trying.

Who is online

Users browsing this forum: Google [Bot] and 21 guests