Working with Data Templates

Each collection is based on one data schema, giving structure to the records in a collection. A data schema is based on an a data template. In the Collection Manager you can have many different templates and when building a collection choose one to base the collection schema on.

On this page:

Using Existing Templates

The Templates tab includes a list of collections and a "Create New Template" button. If your list of templates is blank, just start creating some.

When selecting a template for your collection, you might see one that is close to how you want your records structured but is missing some elements. Select that template and then click on "edit".

This will allow you to make changes to the schema without affecting the actual template. The template will remain the same and still be available for other collections. This method is best if you don't need to save those edits as a new template.

Tip: Alternatively, you could also copy an existing template, make the necessary changes and save it. This way the edits you made will be represented in a new template and available for use with future collections.

When you're done, be sure to click "Back to Collection Properties".

Creating a New Template

Tip: A best practice for collection building is to always include "File Name" as one of your data fields. LUNA will then be able to easily link your records with corresponding media items by using this file name.By default every template will include a field for "File Name". You can easily delete this field if you want, or choose to not have it display in the LUNA Viewer. However, the LUNA Uploader will always look for the "File Name" to link the images and records by. If you change this just be sure you pay attention to the settings in the Uploader and indicate how records and media items should be linked.

Above the list of existing templates, click on "New Template". You'll be asked to give the template a name and description. This is helpful information if you're sharing the Collection Manager with others in your organization and think they could benefit from identifying and then using your template.

Templates are comprised of fields and sometimes of field groups. Often just having fields is enough. Field groups are just that- groups of fields, a nice way to organize common content. For example, you could have a field group called "Creator" and in this group would be fields related to "Creator", such as "Creator Date", "Creator Nationality", etc. In the LUNA Viewer these field groups will display and the fields will be listed below them.

In the Record Editor the only way to create repeating fields is if they belong to a field group. In the example below you see a field group with the fields title, data, date_details, type, format, description, and order repeated twice. Visit Record Editor help section for additional information on repeating fields.

Each field can have its own properties, see below for a description of these properties.

As you build your template:

  • click on "New Field Group" or "New Field" to add these to your template
  • delete a field or field group by clicking on the delete icon
  • to reorganize the fields use the up and down arrows to move them

Tip: As you add fields to a Field Group, be sure you've selected that Field Group first, otherwise the field will be created outside that Field Group.

Field Properties

When creating a data template it's important to think about what properties you will assign each field:

  • Display Name: give the field a name. This will display in both the LUNA Viewer and in the LUNA Library.
  • Field Type: choose either text or Number. Number must be a whole number with no formatting.
  • Text Box Type: single is just a single box; expanding will allow you to enlarge the box to make room for lots of data; autocomplete will complete the word based on the first few letters you type. Autocomplete is based on the existing data in a collection.
  • Length of field: set a maximum and or minimum number of characters
  • For display in LUNA Viewer: allow the data in the field to display in the LUNA Viewer, mostly this would be in the Detail View but could be in the thumbnail label, or media summary as well.
  • Searchable in LUNA Viewer: allow the data in the field to be searchable in the LUNA Viewer.
  • Sortable in LUNA Viewer: allow the data in the field to be sortable in the LUNA Viewer.

As always, be sure to click "Save" when done.