Home : COM
Q10828 - INFO: COM

COM returns Logbook Notes or Result Comments for daily vars.


COM(Offset/Date,  Optional VarNum, Optional Interval, Optional IntervalNumber, Optional IncludeDate)

Offset/Date: If the field is numeric it is assumed to be the offset and is defined as the offset from the start date of the report.  For example, if the start date is 1/1/2000 and the offset is 1, the value from 1/1/2000 will be returned.  If the offset is 2, the value from 1/2/2000 will be returned and so forth.  If the field is a date in quotes or a cell reference to a cell containing a date the value for the date will be returned.

VarNum /LogbookId:  If left blank or set to 0 the fuction will return the Notes from the default Logbook (Daily Comments).  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.

Interval:  Used to retrieve data outside the report date range.  The interval sets whether to go back years (yyyy), months (m), etc…  The following are the valid settings for Interval

yyyy,y    Year
q          Quarter
m         Month
y          Day of year
D         Day
w         WeekDay
ww       Week

IntervalNumber: Used with the Grouping and Offset parameter to set the date to get the comment for.  Sets the number of Groups (set by the Grouping Parameter) to be added to set the dates.  See examples below.

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".



Result Comments can be placed using Locate, Daily Values and checking the "Place Result Comment beside data" option.  Logbook Comments can be placed using Locate, Logbook Notes.




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

Com(1) Returns the Logbook notes for the default logbook (Comments) for 1/1/2000

Com(2) Returns the Logbook notes for the default logbook (Comments) for 1/2/2002

Com(7,0, , ,1) Returns the logbook notes for 1/7/2002 with the date of the note included.

Com(1,-4) Returns the comment 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.

Com(1,24) Returns the result comment for variable 24 for 1/1/2000

Com(1,24,"M",2)   Returns the result comment for variable 24 for 3/1/2000.  Interval of Month, therefore add 2 months.


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?


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:05 AM.
Last Modified on 1/23/2020 11:20 AM.
Last Modified by Scott Dorner.
Article has been viewed 5292 times.
Rated 4 out of 10 based on 10 votes.
Print Article
Email Article