Extract records related to a role

You can use the USER_SYM_SUBROUTINE subroutine with the EXTRACT.ROLES argument in a complex User Symbolic to extract particular records related to a role or sub-role.

Subroutine name

USER_SYM_SUBROUTINE

Subroutine argument

EXTRACT.ROLES

Example of use

You could extract all Object records that have Crown Lynn Potteries as the Primary Maker.

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 EXTRACT.ROLES subroutine argument structure is:

EXTRACT.ROLES!arg2!arg3!arg4!arg5

What the argument parameters mean

Argument parameter Required or optional? Explanation
arg2 Required The System ID of the related file. For example, OBJECT, VE, or TR.
arg3 Required The role code of the related field. For example to retrieve all objects where the person is a Primary Maker, use the role code PD. For more examples, see the list below or contact us at support@vernonsystems.com.
arg4 Optional The System ID of the sub-role. For example, 3 (where 3 may be the System ID for the sub-role Artist).
arg5 Optional Conversion. For example, 1 – do not convert, returns System ID. If left blank, it will display the One Line Display for the record.

Examples of subroutine arguments

This argument will extract the Object records (as System IDs) that have the Person as a Primary Maker with the role Artist. PD is the role code of ‘Primary Maker’ and 3 is the System ID for the sub-role ‘Artist’.

EXTRACT.ROLES!OBJECT!PD!3!1

This argument will extract and report the System IDs for the Entry records where the selected Person is the Owner. EN is the Entry file, OW is the Owner role and there is no sub-role.

EXTRACT.ROLES!EN!OW!!1

Examples of role codes

AS Association Person
CL Classifier
CO Controlling Institution
FU Funder
PD Production Person (primary & secondary)
PP Production Person (primary)
PS Production Person (secondary)
FC Field Collection Person

Email support@vernonsystems.com for more examples, or other file role codes.