{% load i18n %} {% load webpack_static from webpack_loader %}

{% trans "Overview" %}

 
{% blocktrans %}

Functions are discrete operations that can be associated with a Resource Model and are run on specific nodes or cards whenever a user clicks creates or modify's a Resource. Here in the Function Manager you will associate Functions with this Resource Model and configure them appropriately.

To add a Function to this Resource Model, click on it in Function Library, and notice that it is added to the list of Selected Functions. To delete a Function, use the symbol in the upper right corner. {% endblocktrans %}

{% trans "adding a function - click to view" %}{% trans "open in new tab" %}  

{% blocktrans %}

Arches comes with three default functions (see below). However, functions are envisioned as the hook through which developers can easily customize Arches capabilities, because new Functions can be added to your individual Arches installation. Learn more here.

{% endblocktrans %}

{% trans "Define Resource Descriptors" %}

 

{% blocktrans %}This function will generate one or more descriptors for Resources that are created with this Resource Model. These descriptors are used throughout the database interface, but are not saved as part of the resource. This gives you control over the way Resources are identified and described in search results and elsewhere.{% endblocktrans %}

{% blocktrans %}Once added to the Resource Model, use the appropriate tab to configure a descriptor template. Choose a card, and variables corresponding to each node in that card will be added to the template, demarcated with < >. You can rearrange these variables and add text to customize the descriptor. When you have set the descriptors, click Re-Index to update any existing resources in your database.{% endblocktrans %}

{% blocktrans %}If there are multiple instances of a given card in a Resource, the first one added will be used to create these descriptors. To manually change this, edit the Resource in question and drag the desired tile to the top of the list.{% endblocktrans %}

{% blocktrans %}Any user with read access permission to a resource will be seeing these resource descriptors wherever it shows up in search results or on the map. If a card is intended to be hidden from any group of users, it should not be used in this function.{% endblocktrans %}


{% blocktrans %}
Example

Consider a Resource where the Name node value is Folsom School and Name Type node value is Primary.

Selecting the Name card will populate the template with <Name Type>, <Name>. The resulting descriptor would read Primary, Folsom School. Changing the template to Building Name: <Name> would yield Building Name: Folsom School.

{% endblocktrans %}