Defaults

On the Attributes tab (see figure Document types – attributes above) select an attribute from the list and click the Defaults subtab to configure different values for the different views (for the index search panel and for the archive panel when creating new documents).

Figure 99: Document types – attributes: default attribute values

You can do the following:

  • Set a Static value. The input field format depends on the attribute type.

  • Alternatively, define a RAQL query that creates a value based on runtime conditions, and provide a string that follows the RAQL syntax. The query must be a projection to a value. Thus, it must always start with this projection:

    project([value, <expression>], <query>)

    <expression> is a RAQL expression that provides the required values from the RAQL query <query>. In simple cases, to obtain values from the runtime environment, the query can be an empty query as in the following examples:

    project([value,  ima:dateTime:toDate  (ima:dateTime:add   (ima:dateTime:now(), const(0), const(3))   ) ],empty())

    Provides a date that is 3 months in the future based on the current date.

    project([value, ima:session:userName()],empty())

    Provides the current username.

    For related details on the RAQL query language, see Query language RAQL in [SM IS].