Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

As an alternative to using the Portal File Attribute Template builder to create Attributes Templates, Project Administrators can import the Template configuration as a JSON.

šŸ“˜ Instructions

  1. On your local computer, create and save a JSON containing your annotations. See Formatting Guideline for JSON File Attribute Templates, below.

  2. Launch your Project and navigate to the Project Settings.

  3. Select the File Attributes tab and click Import Attribute Template.Ā Ā 

  4. Enter an Attribute Template Name, select the JSON you created for upload, enter an attribute Description. Click Ok.

  5. Your new File Attribute Template is created with visibility Hidden. The File Attribute Template will not be visible to other Project Members. To update this, click the edit icon and click the visibility bar. The slider should move from Hidden to Visible. Select the checkmark and click Make Visible. Visibility will now be turned on and Project Members will be able to see the TemplateĀ and annotate files with these Attributes (see Adding and Modifying File Attributes for more information on how to annotate files).

If the uploaded JSON contains formatting errors, a parse error message will be returned. Please review the Formatting Guideline for JSON File Attribute Templates section below, then check your uploaded file and try again after adapting it accordingly.

šŸ“ Formatting Guideline for JSON File Attribute Templates

JSON is built around two structures:

  • Objects

    • Key-value pairs

    • Surrounded by curly brackets ({})

  • Arrays

    • Lists of items

    • Surrounded by square brackets ([])

Parameters for File Attributes JSON Templates are as follows:

  • Name: the Attribute name (letters or numbers, no spaces).

  • Type: the type of information to be collected (text, single choice, multiple choice, date only, date and time)

  • Value: if type is Single or Multiple Choice, a list of the accepted values, separated by commas.

  • Optional: (default=true). Set to false if the Attribute should be mandatory on collection.

The following example depicts a File Attribute Template created in the Project Settings menu and the corresponding JSON format. You can use this example as a guideline to create your own JSON.

Template created in the Project Settings menu:

image-20241115-014014.png

Corresponding JSON format:

{"attributes":[{"name":"Group","options":["A","B","C","D"],"type":"multiple_select","optional":true},{"name":"FaveMeal","options":["breakfast","dinner","lunch"],"type":"multiple_select","optional":false},{"name":"FaveFruit","options":["apples","bananas","oranges","strawberries"],"type":"single_select","optional":true},{"name":"FaveSnack","type":"text","optional":true},{"name":"DateofCompletion","type":"date","optional":true},{"name":"DateTimeOfDinner","type":"datetime","optional":true}]}

Filter by label

There are no items with the selected labels at this time.

  • No labels