Extract the current related activity

You can use the USER_SYM_ACT subroutine with the CURRENT.ACT argument in a complex User Symbolic to extract the current related Activity record for an Object record. The different arguments let you define what "current" means.

Subroutine name

USER_SYM_ACT

Subroutine argument

CURRENT.ACT

Example of use

Usually, when you report on exhibitions objects were in, it shows the entire exhibition history. This symbolic will show just the current exhibition.

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 CURRENT.ACT subroutine argument structure is:

CURRENT.ACT!arg2!arg3!arg4!arg5!arg6!arg7!arg8

What the argument parameters mean

Argument parameter Required or optional? Explanation
arg2 Required The System ID of the related Activity file.
arg3 Optional This parameter can be used to exclude records that ended more than a certain number of days ago.
arg4 Optional The System ID of a General Flag term. If the field specified in arg5 contains this term, then this Activity record will have the highest priority.
arg5 Optional The Field Mark Count (FMC) of the field to look in for arg4. If not specified this defaults to the GENERAL_FLAG field.
arg6 Optional The FMC of the field to use for the Start Date. For Inward and Outward Loans, the Start Date field will be used by default.
arg7 Optional The FMC of the End Date field. For Inward and Outward Loans, the End Date field will be used by default.
arg8 Optional Do not show the Activity record if it is scheduled more than x days in advance.

Example of use

This symbolic is especially useful for the Exhibition and Loan Activities. For example, you could display the current exhibition that an object is, will be, or has been displayed in.

With just the required arg2, this symbolic will display an "active" Activity record that has a start date before today and an end date after today. If no Activity record is found, it will display a "future" activity with a start date after today. If there are no "future" Activities, it will display a "past" Activity record that has a closing date of less than 100 days before today.

You can also bring back the most current Activity record with a specific general flag.