Home : COMWO
Q10830 - INFO: COMWO

COMWO returns Daily or Result Comments when occurrs

SYNTAX:

COMWO(Offset,  Optional VarNum/LogbookID, Optional IncludeDate)

Offset: Sets which comment to return.  For example, a setting of 1 means return the 1st comment found in the report dates, 2 means return the 2nd Comment found, etc… 

VarNum /LogbookId:  If left blank or set to 0 the fuction will return the Daily Comment.  If set to a postive number, it will return the Result Comment for the VarNum.  If negative, it will return the logbook entry for the logbook with an ID = absolute value of the passed in Logbookid.  For example, you created a logbook and the  system assigned the new logbook an id of 4.  Pass in -4 to get the logbook enteries.

IncludeDate:   A setting of 1 will add the date of the comment to the return value.  For example if the comment is "hello" for 1/1/2000, if IncludeDate is set to 1 will return "1/1/2000 hello".

NOTES:

Result Comments can be placed using Locate, Daily Values.  Logbook Comments can be placed using Locate, CommentsCOM2 differs from COM and COMWO in that is treats each entry as a separate result whereas COM, COMWO treat each day as a separate result.  In the example below, there are 2 entries on 10/17/2022, using COM2 you get 2 results (on rows 4 and 5), where COMWO combines the Notes for the day in one cell (on row 8). 

EXAMPLES:

(Start Date of report is 1/1/2000)

ComWO(1) Returns the Daily Comment for the first Daily Comment found starting on 1/1/2000.  IE if the first Daily Comment is entered on 1/5/2000, the daily comment for 1/5/2000 will be returned.

ComWO(2) Returns the Daily Comment for second Daily Comment found.

ComWO(7,0,1) Returns the Daily Comment for 7th Daily Comment found with the date of the Daily Comment included.

ComWO(1,-4) Returns the 1st comment found in the report date range for the Logbook  with it's ID set to 4.  To find a logbooks ID, go to System Setup, Group Manager, Log Book Manger and click on the logbook in the list.  The Id will be displayed in the lower right hand corner.  See Log Book Manager.

ComWO(1,24) Returns the first result comment found for variable 24.

ComWO(2,24,1)  Returns the second result comment for variable 24 with the date of the result comment included.

Download Example Template: Help_COM_COMWO.ss3 (Click here for download instructions)

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 3/5/2008 10:47 AM.
Last Modified on 10/21/2022 2:35 PM.
Last Modified by Scott Dorner.
Article has been viewed 3990 times.
Rated 7 out of 10 based on 4 votes.
Print Article
Email Article