Return the last related activity
You can use the USER_SYM_ACT subroutine with the LAST.ACT argument in a complex User Symbolic to return the 'last' related Activity record. That is, the Activity record with the closing date that has most recently passed.
Subroutine name
USER_SYM_ACT
Subroutine argument
LAST.ACT
Example of use
You could see the last outward loan that an object had been on.
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 LAST.ACT subroutine argument structure is:
LAST.ACT!arg2!arg3!
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. If this parameter is not specified, the most recently ended Activity will be returned. |
Example of subroutine argument
In this example, the most recently ended related Outward Loan (LO) record will be returned, but only if the End Date was less than 365 days ago.
LAST.ACT!LO!365!