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.
thanks
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:
function SetCustomString()
{
Server.RootObject.Interface.EventJournal.SetCustomStringField( "0000000001CD5EEAFBCE1E40000001C100000000", 0, "Hello");
}
function SetCustomFields()
{
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.
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:
function SetCustomString()
{
Server.RootObject.Interface.EventJournal.SetCustomStringField( "0000000001CD5EEAFBCE1E40000001C100000000", 0, "Hello");
}
function SetCustomFields()
{
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).
Thanks for your reply, hadn't seen these methods. Much appreciated..
Discuss challenges in energy and automation with 30,000+ experts and peers.
Find answers in 10,000+ support articles to help solve your product and business challenges.
Find peer based solutions to your questions. Provide answers for fellow community members!