How to import data into a related field that has a 1: many relationship

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I have a related table (competitors) that allows us to choose multiple values on the sales form.  I need to import existing data.  For other 1:1 related fields, it's easy - I just import the ID of that related record.  For this one, I don't see how to import multiple values in the import.  Any ideas?

Photo of Dana Murphy

Dana Murphy

  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
If I understand the question, One Sales Form Record has many Competitors. If the Competitors are coming off a table driven drop down list as opposed to being hand typed, then you must in fact have a three table setup with a middle join table.  ie 1 sales form has many sales form Competitors and 1 Competitor has many sales form Competitors.

In that case you would need to import into that Join table and provide the Record ID# of the sales form record as [Related sales form]  and also the Record ID of the Competitors table as the [Related Competitor], if the key field of that Competitors table is the [Record ID#].

If that is not the setup of your relationships, post back with what tables you have and how they are related.
Photo of Dana Murphy

Dana Murphy

  • 0 Points
You are correct.  There is a middle join table so that on the sales form, we can select multiple competitors.  For other related table fields, we were able to just put the record id for that item from its related table in the xls file and import and it linked it.  Since there can be multiple competitors, how do I put multiple record ids in the xls file to import?  Or, do I have to do this by doing an import into the middle join table and not via the sales import?

Thanks!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
I just saw the light turn on!  YOu have answered your own question.

"Or, do I have to do this by doing an import into the middle join table and not via the sales import?"

Yes, you need to import into that middle Join table and include the two field typically called [Related sales form] and [Related Competitor].  These are typically numeric fields corresponding to the Record ID# of each of the two Parent Records.