COM returns Logbook Notes or Result Comments for daily vars.
SYNTAX:
COM(Offset/Date, Optional VarNum, Optional Interval, Optional IntervalNumber, Optional IncludeDate,Optional Field)
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".
Field: Optional. The field to return from the Logbook entry. If not specified the Comment is returned.
- Comment
- Type
- Flag
- UD1-UD5
- Datestamp - The date for the entry
- Timestamp - The time for the entry
- Datetime - Date and time for the entry
NOTES:
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.
COM2 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).
SEE ALSO:
COMWO, DDSC, DDSCWO
EXAMPLES:
(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)