App Resources

:book: This guide details how to manage App Resources, which are the configuration files stored within the Specify database that control various behaviors of the application. It helps with the different types of resources available in App Resources and how to upload, edit, or delete them.

First, you need to navigate to User Tools. You access this menu by clicking on your username in the navigation bar.

From here, you need to click App Resources.

App resources are all resource files pertaining to queries, export mappings, DwCA metadata, labels, reports, and other miscellaneous database files.

Form Definitions contains all of the view definitions established in the database. The view heiarchy goes as follows:

User > User Type > Collection > Discipline

If a user has a view definition under their username in a collection, it is used first. If there is not one, it uses the user type view definition. If that does not exist, then it uses the collection view and so on…

You can filter the resource type by clicking on the button in the top left.

From here you can see the major categories - App Resources and View Definitions.

Under App Resources, you can see a large number of resource types along with their count.


Resource Types

Reports and Labels

A Label is designed to be a tag or sticker associated with a specific specimen or container.

A Report on the other hand is a document designed to summarize, list, or aggregate data. Both are JRXML files.

User Preferences & Default User Preferences

This uses the user preferences visual editor and allows you to set the preferences of a user or default for users using the same interface as the traditional user preferences menu.

User Preferences resources are the customized user preferences for an individual user.

Default User Preferences can be placed at the root of a division, collection, or user type rank and will set the default for all users added to that group. This is how you establish default preferences in Specify 7. These can be overwritten by a user when they customize their preferences.

Leaflet Layers

Allows users to overwrite the default list of tile servers offered though Leaflet map and to add paid tile servers that require API keys.

RSS Export Feed

The RSS Export Feed helps with the publishing of a collection’s data to global biodiversity networks like the Global Biodiversity Information Facility (GBIF) and iDigBio.

Express Search Config Documentation

This is where you can configure the simple search behavior manually in the XML. This is carried over from the Specify 6 configuration and is not possible in Specify 7.

Web Links

Specify allows you to add buttons to forms that can take you to different websites that can be useful when entering or evaluating data within a collection. This allows you to create new links to add to the forms.

Field formatters

The field formatters (UIFormatters) app resource essentially defines the field formats available in Specify that can be assigned in the Schema Config.

You have a <format> that includes attributes describing the name, if it is a “system” (default) format or not, Java class, field name it is assigned to (not required), and whether or not it is used by default for that field (this is ignored in favor of the Schema Config setting).

There is a list of fields contained within the format (see each <field>) that can be set to one of several types (year, separator, numeric, alphanumeric) that dictate its behavior. The size is the length for that given field, inc (for numeric fields) indicates whether or not it should be incrementing automatically, and the value contains the default text for that field in the format. If you have a year field, the byyear attribute controls whether or not it is set to the current year by default.

  <format system="true" name="AccessionNumber" class="edu.ku.brc.specify.datamodel.Accession" fieldname="accessionNumber" default="true">
  <autonumber>edu.ku.brc.specify.dbsupport.AccessionAutoNumberAlphaNum</autonumber>
    <field type="year" size="4" value="YEAR" byyear="true"/>
    <field type="separator" size="1" value="-"/>
    <field type="alphanumeric" size="2" value="AA"/>
    <field type="separator" size="1" value="-"/>
    <field type="numeric" size="3" inc="true"/>
  </format>

If you use Specify 6 to customize the format for a given field, it will automatically create a copy of the default UIFormatters app resource and add it to your app resources.

Record Formatters

This is the resource type for DataObjFormatters, used for establishing custom formatters in the database in XML for use in all areas of Specify.

    <format
        name="Address"
        title="Address"
        class="edu.ku.brc.specify.datamodel.Address"
        default="true"
        >
        <switch single="true">
            <fields>
                <field>address</field>
                <field sep=" ">address2</field>
                <field sep=", ">city</field>
                <field sep=", ">state</field>
                <field sep=" ">postalCode</field>
            </fields>
        </switch>
    </format>

Search Dialog Definitions (Documentation)

Data Entry Tables

This is the resource type for DataEntryTaskInit, used to define which data entry tables are visible in the data entry dialog window.

<views>
  <std>
    <view title="Collection Object" view="CollectionObject" iconname="CollectionObject" tooltip="Open Collection Object Form" order="0" sidebar="true"/>
    <view title="Collecting Event" view="CollectingEvent" iconname="CollectingEvent" tooltip="Open Collecting Event Form" order="1" sidebar="true"/>
    <view title="Locality" view="Locality" iconname="Locality" tooltip="Open Locality Form" order="2" sidebar="true"/>
    <view title="Taxon" view="Taxon" iconname="Taxon" tooltip="Open Taxon Form" order="3" sidebar="true"/>
    <view title="Agent" view="Agent" iconname="Agent" tooltip="Open Agent Form" order="4" sidebar="true"/>
    <view title="Geography" view="Geography" iconname="Geography" tooltip="Open Geography Form" order="5" sidebar="true"/>
    <view title="DNA Sequence" view="DNASequence" iconname="dnasequence" tooltip="DNA Sequence" order="6" sidebar="true"/>
    <view title="Reference Work" view="ReferenceWork" iconname="referencework" tooltip="Reference Work" order="7" sidebar="true"/>
  </std>
  <misc>
    <view title="Storage" view="Storage" iconname="Storage" tooltip="Open Storage Form" order="0" sidebar="true"/>
  </misc>
  <batch/>
</views>

Interactions Tables

This is the resource type for InteractionsTaskInit, used to define which interactions tables are visible in the interactions dialog window.

Other XML Resource

This is for miscellaneous XML resources in the app resource viewer.

Other JSON Resource

This is for miscellaneous JSON resources in the app resource viewer.

Other Properties Resource

This is the resource type for the global and remote user pref resources.

Here is a sample Global Prefs file:

#Global Prefs
#Tue Nov 01 15:46:51 CDT 2022
FixSpAuditLogFields=true
RELEASES=6.4.11
DNACheck\:32768=co-yes ms-no
InteractionsTaskAfterDeaccFix=true
InvalidPermissionCleanup=true
UniquenessConstraintsFix=true
FixedSpQueryOperators=true
FixUploaderRecordsets=true
attachment.key=c3wNpDBTLMedXWSb8w2TeSwHWVFLvBwiYmtU0CdOzLQtelcibV9sTXW7NxZlX68
FixedGTPTreeDefParents=true
FixPaleoContextTypeSearch=true
attachment.url=http\://biimages.biodiversity.ku.edu/web_asset_store.xml
FixNullEmbeddedCollectingEvents=true
FixNullTreeableFields=true
FixPaleoContextSearchView=true
DNACheck\:4=co-yes ms-no
GEONAMES_LAST_MOD=1478203068000
PaleoAftermathCleanup=true
FixNullDatePrecisions=true
FixedUnmappedSchemaConditions=true
FIX_DEFDATES_PREF=true
UPDATED_GUIDS_CNV_32768=true
FixAttachmentOrdinal=true
GGBNAftermathCleanup=true
CHECK_ATTCH_ERR=false
attachment.use_path=false
fixSymbiotaExportSchema=true
FixedUnMatchedWBSpecifyUserIDs=true
CollectingEventsAndAttrsMaint1=true
ExsiccataUpdateFor1_7=true
USE_GLOBAL_PREFS=true

In Remote preferences you can configure things like Automatically create a new Preparation, Determination, or Collection Object Attribute upon CO creation and Enable creating children for synonymized nodes.

This is also for miscellaneous property resources in the app resource viewer.

Other app resource

This is the proper resource type for DwCA and DwCA_metadata files for RSS feed setup.

<?xml version="1.0" encoding="utf-8"?>
<archive>
  <core rowType="http://rs.tdwg.org/dwc/terms/Occurrence">
      <queries>
      <query name="occurrence.csv" contextTableId="1">
	<id term="http://rs.tdwg.org/dwc/terms/occurrenceID" isNot="false" isRelFld="false" oper="11" stringId="1.collectionobject.guid" value=""/>
        <field term="http://rs.tdwg.org/dwc/terms/institutionCode" isNot="false" isRelFld="false" oper="11" stringId="1,23,26,96,94.institution.code" value=""/>
        <field term="http://rs.tdwg.org/dwc/terms/institutionID" isNot="false" isRelFld="false" oper="11" stringId="1,23,26,96,94.institution.altName" value=""/>
        <field term="http://purl.org/dc/terms/license" isNot="false" isRelFld="false" oper="11" stringId="1,23,26,96,94.institution.copyright" value=""/>

This is for all other remaining resources in the app resource viewer.


App Resource Navigation

Once you are viewing a resource, you can Download, Load File, Delete, Clone or Save.

Button Description
Load File Allows you to select a file on your system to replace the existing file or resource you are viewing.
Download Allows you to download a copy of that resource file. This can be useful when troubleshooting issues or editing the file externally.
Clone Creates a duplicate of the resource in the database at the same level (not available for every resource type)
Add Adds a default copy of the resource in the database at the same level
Save Commits all changes to the database.

There is also a full screen button in the top right of the form. This expands the viewer to occupy the entire window and removes distractions.

You can edit the name of the resource by clicking on the :pencil_: icon to the right of the name. This is also where you can delete a resource.

Creating a New Resource

To create a new resource, you can click on the + Add Resource button below any list of items at any rank in the resource hiearchy.

From here, you need to select either App Resource or Form Definitions.

For app resources, you will see a list of resource types with corresponding links to documentation.

You can see the entire list of types and examples here.

Now you can create resources and save them. Clear your cache and your changes will be reflected in Specify itself!

Setting Default User Preferences
Editing Web Links in Specify 7
Add Fields to a Table's Query Combobox Search
Express search config Specify-7
Show attachment URLs in queries and when data exporting
Customizing Table Formats and Aggregations
Error when editing taxon tree in specify7
Attachments in Specify :attachments_:
Couldn't find 'Global Prefs'. Application will exit
Create a Collection Relationship in Specify 7
Simple Search mistake? (Search returns all synonymized taxon records)
Different results when running same query in Specify
Getting Started with Specify
Editing Forms in Specify
What is the equivalent of System & Institution in SP-7?
Add Agent Identifiers to the form
Collecting Trip table Form definition and Data Entry
Moving from Specify 6 to Specify 7
Using Forms in Specify 7
Field Formatting and Auto-Numbering
Collection Object Groups
Add links from Agent to ORCID, Bionomia, Wikidata, and more
How does Specify 7 work with the Web Asset Server?
Catalog Number Regular Expression Formatter Set Up
How to Change or Add a Field Format
Export a Report or Label
Editing Table Formats and Aggregations
Change tree node count behavior
Show the Taxon author in the tree viewer
Field formatters with an optional final letter
Edit the Query Combo Box Simple Search Form
Specify 7.8 Show & Tell
Export Determination History for Symbiota and GBIF
Global preferences
Edit the Form Grid to Display Different Fields Than the Subform
Enable creating children for synonymized nodes
Error message during validation
Configure Database Date Format
Configure Database Date Format