webCOMAND

Import/Export Tutorial

This tutorial builds on the Content Types tutorial to illustrate how to import and export objects, which will result in a good data set for subsequent tutorials.

Watch the video above, or follow the step-by-step instructions below.

Navigate to Presidents

If not continuing immediately from the Content Types tutorial, navigate back to the presidents.

  1. Launch the Bases App.
  2. Click "Presidents" Type.

Import Dialog Import Presidents from JSON

Content can be imported from CSV and JSON files.

  1. Click Import (New Menu) in the Collection Bar.
  2. Click "From URL".
  3. Enter the Source URL: https://www.webcomand.com/packages/com_presidentsdemo_www/install/presidents.json
  4. Click Next
  5. Click Import

NOTE: Any import notices, warnings or errors will display in an alert bar.

Export DialogExport Presidents to CSV

Content can be exported to CSV and JSON files.

  1. Click Export (Export Button) in the Collection Bar.
  2. Select "Comma Separated Values (CSV)"
  3. Click Export
Use selection check boxes (Select Button) to export a subset of objects from a list.

Export Presidents with Photo to CSV

By default, file and image fields, like Photo, will not be exported to CSV.  The following steps can be used to export file and image fields.

  1. Launch the Content Manager (CMS) App.
  2. In the folder tree on the left, expand and click:
    Bases / Presidents / President
  3. Click the view button (View Button) and then select Grid View.
  4. Click the toggle cPath editor button (cPath Edit Icon).
  5. Append "{SELECT Number, Name, Photo}" (without the quotes) and press ENTER.
  6. Click Export (Export Button) in the Collection Bar.
  7. Select "Comma Separated Values (CSV)"
  8. Click Export
To learn more about cPath, see the cPath Language Reference.

Conclusion

Now we have a simple content database of United States presidents.  We will use it to illustrate paths and queries next.