Kindly Help me in solving this. Always getting this error when I simply runs a script on a button click, for getting a value from a text field and writing it to a memory tag.
Actually, I want a run a script for getting data from Alarm Journal Table and exporting it to Excel.
For this I use this script, but unfortunately I am getting the same error.
You are running the script in the right place, the script is just wrong.
The error message states that the ‘event’ object doesn’t have a ‘source’ attribute.
Using self.view will reference the view the button is located in, from there you can point it to the alarm journal table.
e.g. e.g. if the alarm journal table is a child object of the view and it’s name is AlarmJournalTable use: self.view.AlarmJournalTable