---
title: "Adding notes, comments to specific maintenance reasons 3.0"
id: "adding-notes-comments-to-specific-maintenance-reasons-3-0"
project: "Knowledge Base"
url: "https://docs.sepasoft.com/articles/knowledge-base/adding-notes-comments-to-specific-maintenance-reasons-3-0"
updated: 2026-07-23T18:08:41Z
---

# Adding notes, comments to specific maintenance reasons 3\.0

You have a requirement where Operators must add a comment (note) to every entry that was coded as a specific Mode, for example, 
Maintenance or Production, for a given Line, Equipment.

## Step-by-step guide

We will use an Analysis Controller to feed a Power Table which has a onCellEdited Extension Function to handle writing the Note

1. Create an Analysis with the following:
Data Points: Mode Begin Time,Mode Duration,Mode End Time,Equipment Note
Filter By: Equipment Path = @eqPath AND Equipment Mode Type = 'Maintenance' (or Production or whatever Mode you wish to Filter by)
Group By: Mode Begin Time
on your Analysis Controller, add a Custom Property eqPath = string
in the Property Window, the Analysis Controller should look like this:
![](/resources/Storage/knowledge-base/adding-notes-comments-to-specific-maintenance-reasons-3-0/image2019-6-5_14-6-39.png)
2. add a Date Range and a Power Table Component
you will bind
the Analysis Controller Start/End Date to the Date Range Start/End Date
and 
the Power Table Data to the Analysis Controller Data
3. add some Scripting to the Power Table Extension Function onCellEdited

Code

```
if colName == "Equipment Note":
		# get the equipment path from the MES Object Selector
		eqPath = self.parent.getComponent('MES Object Selector').equipmentItemPath
		# get the date of the event from the Analysis dataset
		date = self.data.getValueAt(rowIndex, 'Mode Begin Time')
		
		# check to see if there is not already a note
		if system.mes.getTagCollectorValue(eqPath, 'Equipment Note', '', date,) is None:
			# if no note exists, add the note
			system.mes.addTagCollectorValue(eqPath, 'Equipment Note', '', date, newValue)
		else:
			# otherwise, update the note
			system.mes.updateTagCollectorValue(eqPath, 'Equipment Note', '', date, newValue)
		# rerun the analysis	
		self.parent.getComponent('MES Analysis Controller').refresh()
```

    ![](/resources/Storage/knowledge-base/adding-notes-comments-to-specific-maintenance-reasons-3-0/image2019-6-5_14-9-53.png)