Hello, how can I allow the update/write of these columns? They seem to be there for our use however I can't update these columns via QueryPad or via ST script.
No hits on searching Help and didn't see anything in Configuration to allow these to be used.
Solved! Go to Solution.
There fields can only be set programmatically using the following methods:
The CEventJournal database table is an aggregate. The aggregate is a field called EventJournal and is on the root group object in the database.
The following JScript examples show there use from a mimic script:
Server.RootObject.Interface.EventJournal.SetCustomStringField( "0000000001CD5EEAFBCE1E40000001C100000000", 0, "Hello");
Server.RootObject.Interface.EventJournal.SetCustomFields( "0000000001CD6BEB2D16B9DC000054C100000000", "Hello world", 1, 2, 3 );
The RecordId will obviously need to match an actual record in your event journal and therefore won't be a constant like these examples.
@AndrewScott For very restricted examples it would be possible to do this using a User Method.
Not sure what the use would be since the RecordId couldn't be dynamically entered... but it would arguably be possible.
It's probably important to note that these methods do require Control permissions on the $Root object.
Which for many databases may not be configured for the majority of users.
I'm actually intrigued by what permissions are required for the 'AddComment' method on the same aggregate.
It doesn't appear to have a Privilege associated with it in my version (GeoSCADA 2019 May 2020 Update).