OwnedResource
Resource-Specific System Function
The OwnedResource function returns the nth Resource's name-index number currently owned by the Entity or downtime making the function call. The function parameter indicates the position of the Resource in the owned Resources chronological list. For example, OwnedResource(1) returns the longest owned Resource in the list and so on.
Syntax
OWNEDResource ({<expression>})
Examples
OWNEDResource (2)
OWNEDResource (ResQty())
OWNEDResource ()
Parameters
({<expression>})
The nth Resource currently owned by the Entity or downtime making the function call. When this parameter is not used, the function returns the last Resource captured that is still owned by the Entity. If the parameter value is not within the range of the Resource list, or if the Entity or downtime currently does not own a Resource, the function returns a 0 (zero) without a warning or error message.
Remarks
A preempted Resource is NOT removed from the list but marked temporarily to indicate that the preemptee does not own the Resource. When the Resource resumes the original process after being preempted, it retains its original rank in the list.
OwnedResource is valid in Entity speed fields, traveling-time fields, resource fields, Resource downtime logic, operation logic, Location downtime logic, routing fields, arrival logic, debug user-condition fields, and move logic.