Add Notes to Alarm in Client Window

Good Morning Everyone,
I have alarm setup on a tag, There is note field in there. Let’s say that this alarm is for sensor and note is troubleshooting steps. Initial note is to reconnect sensor but over time operator realizes that sensor is getting dirty and he want to add that to Alarm note, So when Alarm occurs next time it will show 2 statements in there, one initial statement and one added by operator. I am pretty sure It’s doable. I am not sure though how to do it.
Share your thoughts.

That note is for the alarm configuration not an alarm event. The Acknowledge notes is a more appropriate place for this.

Yes but if operator adds anything in Acknowledge notes, I will not appear in Same alarm occurs. Whole purpose of editing note is so that new troubleshooting steps can be added everyday for each alarm by the person solving them.

If you insist on doing this you will need to use system.tag.getConfiguration in conjunction with system.tag.configure and programmatically append your comments. Again, this is not the intended use, i don’t know what the limit is on the field and its messy.

Edit:
I may be wrong in my assumptions, but it sure seems like a lot of hoops to jump through to implement.

From the documentation:
A place for any free-form documentation about the alarm that can be displayed to users.

Hello @josborn , I have another idea but before I execute that I need to know one small thing. in Alarm Status table, there is a property : selected Alarm,It’s a dataset. I am trying to add Notes as extra column but I am not able to,Can you try and let me know if you are able to do so.


Let me know,

Thanks

If you want to add the Notes property to the alarm status table just right click the table header and check the box for Notes.

If you see in in picture, Its already there, I want to add it into dataset of selected alarm property.

You can’t. You can add your own custom property and use system.dataset.addColumn in conjunction with system.tag.getConfiguration to get the notes.

Also, you have not shown your status table at all let alone the notes column.

This took me longer to figure out than i would like to admit. If you create a custom property “newSelect” and put this code on a property change event of your alarm status table it will include the notes in you custom property. This only works for single selection, but you could adapt it for multi select.

alrms = system.dataset.toPyDataSet(event.source.selectedAlarms)
if len(alrms) > 0:
	source = alrms.getValueAt(0,1).split(':')
	tag = source[3]
	try:
		Notes = system.tag.getConfiguration(tag)[0]['alarms'][0]['notes']
		event.source.newSelect = system.dataset.addColumn(alrms, 6, [Notes], 'Notes', str)
	except:
		event.source.newSelect = system.dataset.addColumn(alrms, 6, [""], 'Notes', str)

1 Like

Wow. Thank you so much for your efforts. I will try this respond to you. :slight_smile: .

No prob, here’s a small improvement:

alrms = system.dataset.toPyDataSet(event.source.selectedAlarms)
if len(alrms) > 0:
	source = alrms.getValueAt(0,1).split(':')
	tag = source[3]
	try:
		Notes = system.tag.getConfiguration(tag)[0]['alarms'][0]['notes']
	except:
		Notes = ""
	event.source.newSelect = system.dataset.addColumn(alrms, 6, [Notes], 'Notes', str)
else:
	event.source.newSelect = system.dataset.addColumn(alrms, 6, [], 'Notes', str)

I am trying to do this in perspective but don't know where to add the custom property and no property change event could be found here. Please help. I am using v 8.1.31

This question isn't tagged specifically but based on the OP's screenshots it is for vision, i am not sure how you would accomplish this in perspective. Maybe if you start another topic with the appropriate tags someone here can help you.

1 Like

Hi josborn, how do you add the notes?? I mean, did you create a textbox or something where you can type the notes??
The common way is through Acknowledge Notes, but as is mentioned before, you can't add more comments to the same alarm.

And second thing, is this script able to do it for multiple selection??

I hope you understand my question.
Kind regards.