Calling convention: GetReasonCommentByIndex("ContainerName": String, ReasonIndexInContainer: Integer): String
Description: Returns the remark of a reason at a specified position in a reason container. Index -1 selects the last reason.
Parameters:
ContainerName: reason-container entry name.
ReasonIndexInContainer: zero-based reason index, or -1 for the last reason. The implementation also accepts optional target object name and DATA_ID as a third and fourth argument.
Returns: Reason remark, or NULL for missing arguments or an out-of-range index. Invalid containers or target objects raise an error.
Availability: Default; uses the current record unless the implementation-only target object and DATA_ID arguments are supplied.
Example:
LastComment := GetReasonCommentByIndex("DowntimeReasons", -1);