
Posted: 2020-07-10 08:04 AM . Last Modified: 2023-05-03 12:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-10 08:04 AM . Last Modified: 2023-05-03 12:13 AM
CDBEventJournal Custom fields : CustomStringField , CustomNumericField1 ..
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
- Labels:
-
Logic
Link copied. Please paste this link to share this article on your social media post.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-10 11:10 AM
There fields can only be set programmatically using the following methods:
- CEventJournal::SetCustomStringField( RecordId, Index, Value )
- CEventJournal::SetCustomNumericField( RecordId, Index, Value )
- CEventJournal::SetCustomFields( RecordId, StringValue, NumericValue1, NumericValue2, NumericValue3 )
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.
Andrew Scott, R&D Principal Technologist, AVEVA
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-10 11:10 AM
There fields can only be set programmatically using the following methods:
- CEventJournal::SetCustomStringField( RecordId, Index, Value )
- CEventJournal::SetCustomNumericField( RecordId, Index, Value )
- CEventJournal::SetCustomFields( RecordId, StringValue, NumericValue1, NumericValue2, NumericValue3 )
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.
Andrew Scott, R&D Principal Technologist, AVEVA
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-10 09:00 PM
@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).
Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-13 11:10 AM
Thanks for your reply, hadn't seen these methods. Much appreciated..
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.

