Importing Data
There are times when you will want to populate a collection with records that already exist. You may have records from another system that you want to bring into your Coghead application, or maybe you need to pre-populate a collection before deploying your application to users. The CSV import feature allows you to import records into a collection from a comma separated value (CSV) file.
1. Click on the wrench
next to the Collection tabs. You can also click on the down arrow located in the Collection's tab.
2. In the menu displayed, find the Collection and place the cursor over the name to display the sub-menu. (This example illustrates importing a csv file with resources information into the People Collection in the Basic Project Manager application.)

3. Click Import CSV file . The Import window will be displayed.

If you are going to use the records in this file as a data source for a combo box, sort the records first (in alphabetical order, for example). The records will be loaded in the Collection in the same order that they appear in the CSV file.
4. Click Browse . Locate and open the csv file that contains the data. The File Name field will be populated with the absolute path and name of the file that you just opened.
5. Put a check mark on the First Row is Header checkbox if the first row of your CSV file is a header row. If you specify this, the first row of the CSV file will not be uploaded.

6. Click Import. The Set Value window will pop up.

7. In the Set Value window, map the fields from the input file into the Collection's fields. Click OK. A message pop-up will display an ID associated with the import and a message saying that the asynchronous data import has been executed.

8. Click OK. Depending on the size of the import file, you may not notice the new records added to the collection. To check the status, click on Manage Account under the Account drop-down list.

9. In the Status tab, you will see a grid that shows information about the data import, including who executed the import, when it was started, the status, and the number of records added or updated. Once the import has completed, the record in the Status grid will be updated to indicate the end date and the status will be marked as completed. An email will be sent out to the user who executed the import (using the email address stored in the user's profile) indicating the completion.

10. You can now go back to the Collection to see the newly updated or added records.

Expected Data Formats When Importing Data into Coghead
|
Data Type:
|
Expected Format:
|
Example:
|
|
Date
|
yyyy-mm-dd
|
2008-06-16
|
|
Time
|
HH:MM:SS
|
12:30
|
|
Date Time
|
yyyy-mm-ddTHH:MM:SS
|
2008-06-16T19:30:00
|
|
Boolean Value
|
true or false
|
"true"
|
|
Day-Time Duration
|
PwDxHyMzS
|
P2DT5H30M
|
|
Year-Month Duration
|
PaYbM
|
P2Y6M
|
|
Link
|
Record ID of linked Record
|
Example13054418018479564
|
All bold leters indicate a variable number, for more information on importing linked relationships click here.
Aggregate Calculations When Importing Data
If you have any aggregate calculations in the collection (aggregate fields are fields in records in another collection, typically master as in a item-master relationship, that does common aggregate functions-count/sum/avg/min/max- on the fields of the records that are getting imported), while the records are being imported, we keep track of the masters that would be affected by the imported records and then once all the records are imported, the aggregates for the masters that are affected are recalculated.