Join fields together

You can use the USER_SYM_SUBROUTINE subroutine with the MULTI.FIELDS argument in a complex User Symbolic to join two or more fields together.

Subroutine name

USER_SYM_SUBROUTINE

Subroutine argument

MULTI.FIELDS

Field type

All fields

Examples of use

This field is especially helpful when your collection is online. You could combine the fields Brief Description and Credit Line to make a web description.

Argument syntax and parameters

The subroutine is a piece of code that uses ‘arguments’. An argument is a set of options that tells the subroutine what to do. The argument parameters are commonly separated by an exclamation mark.

The MULTI.FIELDS subroutine argument structure is:

MULTI.FIELDS!arg2!arg3!arg4!arg5!arg6

What the argument parameters mean

Argument parameter Required or optional? Explanation
arg2 Required

Internal field names of fields to be concatenated, delimited by ';'.

For example, PROD_PRI_PERSON;PROD_PRI_ROLE

arg3 Required Delimiter to be used between fields. This can be just a space or CR/LF (Carriage Return Line Feed) to start each field on a new line.
arg4 Optional Delimiter to be used between values, if one or more of the fields is multi-valued.
arg5 Optional

AMV flag for associated multi-value fields. That is, fields that appear together in the same table, such as Artist/Maker and Role.

  • If no AMV flag is specified, values will be listed by column. For example:
    Artist/Maker: Bill Culbert, Ralph Hotere, Role: Artist, Artist.

  • If the AMV flag is set to 1, values will be displayed by row. For example:
    Artist/Maker: Bill Culbert, Role: Artist, Artist/Maker: Ralph Hotere, Role: Artist.

  • If the AMV flag is set to 2, the first value for the first field will be displayed in front of every value for the second field. For example:
    Artist/Maker: Bill Culbert, Role: Artist, Artist/Maker: Bill Culbert, Role: Artist.

  • If the AMV flag is set to 4, delimiters are retained for missing fields. When MULTI.FIELDS is used in a symbolic to export structured data, the field separators are essential to retain alignment between fields across multiple rows of data.

arg6 Optional Prefix text for each field, delimited by ';' For example:
'Artist/Maker: ;Role: '.

Example of subroutine argument

This argument will join the Artist/Maker and Role fields as one. The delimiter between both fields and values is a comma and a space. The AMV flag is set to 1, meaning terms will be displayed by row (from left to right, row by row)..

MULTI.FIELDS!PROD_PRI_PERSON;PROD_PRI_ROLE!, !, !1

For example, Bill Culbert, Artist, Ralph Hotere, Artist.