Announcement

Collapse
No announcement yet.

Question about import

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question about import

    I need to import a csv file with counterparty data. The file contains the following data:
    - company name
    - phone
    - address
    - type of activity
    ...

    In the import tab, I select: Counterparties

    But I encounter the fact that the company name is a link to the "Companies" object.

    Question: What logic is embedded in the import? If I first import only the "names" in "Companies", then how can I get the ID?

    I see the solution to this problem as:
    1. Create a string variable "Company name" in "Counterparties".
    2. Import the csv file into "Counterparties" (all fields).
    3. Import the csv file into "Companies" (field - name).
    4. Create a link using the SQL query:

    UPDATE contact_table AS c JOIN company_table AS cmp ON c.company_name = cmp.name SET c.company_id = cmp.id;

    Is this how it is done or am I missing something in the import logic?​
Working...
X