Fill ref column during .csv import based on selected row in ref table

I am using an interactive dashboard view. when I select a row in the table, a detail view populates. Another table view also populates displaying a bill of materials filtered out using the selected row. This BOM table view has an action to import a .CSV file if a BOM for the selected row does not exist. There is a column in the bom table that I want to auto populate with the selected rows key column value. This column is set as a ref back to the main table that is used for the selection in the dashboard. I am having trouble finding out how to have this automatically added during the import.

1 3 398
3 REPLIES 3

Did you ever figure out an approach? I'm facing the same challenge.

If you are ok with having to do two actions, here is an approach...

  • Create a temporary import table (user ID aware to accommodate multi user handling with a security filter)
  • action 1: Import a CSV into the temp table
  • action 2: update the imported rows with the parent ID
  • action 3: copy the rows to the child table
  • action 4: delete the temp import rows for house keeping

  You can call all the actions from the Parent table but you cannot sequence 1 and the rest in one sequence of actions. So after you let the user import a CSV,  you have to ask the user to press another action button to perform the rest.

 I believe this discontinuity results from the fact that CSV import is executed in the background.

Thanks for replying. I had already landed on essentially that approach, but skipping the temporarily populated table. Instead, I added a temporarily populated column to the parent table to store the current user id, which in turn enables the initial value of the parent ID column in the child rows to lookup the parent ID associated with the current user.

I also cobbled together a complex solution to do it all with a single user action. See
Populate child row's parent ID when child row is created via CSV import, and certainly reply there if you have any ideas for a more elegant implementation.

Top Labels in this Space