AgileApps Support Wiki Pre Release

HowTo:Import Data from an External System

From AgileApps Support Wiki
Revision as of 21:31, 11 May 2012 by imported>Aeric

<noinclude>

For:   audience
Level: level
Time:  N minutes

See more:
    ◾ HowTo Guides

</noinclude>...First line here...

  • Activate the noinclude block so it doesn't appear when Guides are aggregated.
  • audience = Users, Designers, Developers
  • level = Beginner, Intermediate, Advanced
  • N = 1, 2, 5, 10, 15, 20, 30 (minutes)

Heading

Top level heads in HowTo Guides are H3's, so they can be combined into a big PDF, one day.


If you have data in an external system, you can generally export it as a plain text file, with one record per line, where values in each line are separated by values. That kind of file is known as comma-separated value (Template:CSV) file. Using such files, you can import data into your application objects.

In this guide, you'll create a few items of data in a spreadsheet, and use that. But the data could come from any system that is capable of exporting CSV data.

Preparation

This HowTo Guide builds on HowTo:Create_a_Simple_Application. If you haven't done that one yet, run through it now to create the objects you'll be importing data into.

If you have already worked through that guide, and you've created records to see how things work, let's start by doing a Mass Delete of any data you may have entered, so as to import into a fresh collection objects.

Just as a matter of good form, we're first going to delete the records at the bottom of the "lookup chain". Then we'll work our way up the chain. That way, we're sure that no record is left with a pointer to a target record that doesn't exist.

  1. Visit Workspace > OrderItems
  2. At the left edge of the table's header row, click All
  3. At the top of the window, click [More Actions...]
    A dropdown appears.
  4. Select Delete
  5. Repeat the process for Orders
  6. Repeat the process for Customers

Create a Spreadsheet with Sample Data

  1. Create Customer data
  2. Create Order data
  3. Create Order Item data

Export the Data as CSV Files

  1. Export Customer data
  2. Export Order data
  3. Export Order Item data

Import the Data

The process here is to start at the top of the lookup chain, so that the Lookups in the incoming record all resolve to an actual record. (It isn't strictly necessary to do things in that order, but it's good form.)

Coming soon...