PREP_PROCESS_COMMENTS

Use the PREP_PROCESS_COMMENTS script function to retrieve the timestamp, user and text of a task comment. The script lets you filter for a particular text in the comment. The script function returns a reference to a data sequence that you can use for further processing by assigning the return code to the :PROCESS script statement. Use the GET_PROCESS_LINE script function to access each comment in the task.

Notes:

More Information:

Syntax

PREP_PROCESS_COMMENTS ([RunID] [,text] [, user])

Parameters

Notes:

Examples

A task has been started, and contains the following comments:

The following script retrieves all comments in the task, and prints the user and the text of the comments in the activation report.

:SET &HND# = PREP_PROCESS_COMMENTS()

:
PROCESS &HND#
:   
SET &USER# = GET_PROCESS_LINE(&HND#,2)
:   
SET &TEXT# = GET_PROCESS_LINE(&HND#,3)
:   
PRINT "&USER#:  &TEXT#"
:
ENDPROCESS

:
CLOSE_PROCESS &HND#

The following script retrieves only the comments made by the user called SMITH, and prints them in the activation report, including the timestamp.

:SET &HND# = PREP_PROCESS_COMMENTS(,,"SMITH/VIE")

:
PROCESS &HND#
:   
SET  &TIME# = GET_PROCESS_LINE(&HND#,1)
:   
SET &TEXT# = GET_PROCESS_LINE(&HND#,3)
:   
PRINT "&TIME#:  &TEXT#"
:
ENDPROCESS

:
CLOSE_PROCESS &HND#

The following example shows a script that is called from a different task. The script retrieves the RunID of the task that contains the comments, and uses the RunID to retrieve all comments in the task which include the word "error".

:SET &RunID = GET_UC_OBJECT_NR(MM.RETRIEVE.FILES)

:SET &HND# = PREP_PROCESS_COMMENTS(&RunID,"*error*")

:
PROCESS &HND#
:   
SET &TEXT# = GET_PROCESS_LINE(&HND#,3)
:   
PRINT "Comment: &TEXT#"
:
ENDPROCESS

:
CLOSE_PROCESS &HND#

See also:

seealso

Script Elements for Data Sequences