Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84660members
354046posts

CDBEventJournal Custom fields : CustomStringField , CustomNumericField1 ..

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Solved
OrlandoC
Crewman
Crewman
0 Likes
3
1067

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

Tags (2)

Accepted Solutions
AndrewScott
Commander
Commander
0 Likes
2
1054

Re: CDBEventJournal Custom fields : CustomStringField , CustomNumericField1 ..

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, Lead Engineer, AVEVA

See Answer In Context

Tags (1)
3 Replies 3
AndrewScott
Commander
Commander
0 Likes
2
1055

Re: CDBEventJournal Custom fields : CustomStringField , CustomNumericField1 ..

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, Lead Engineer, AVEVA
Tags (1)
BevanWeiss
Spock
Spock
0 Likes
0
1048

Re: CDBEventJournal Custom fields : CustomStringField , CustomNumericField1 ..

@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).

2020-07-11 13_58_29-CEventJournal - Internet Explorer.png

 

 


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 (1)
OrlandoC
Crewman
Crewman
0 Likes
0
1037

Re: CDBEventJournal Custom fields : CustomStringField , CustomNumericField1 ..

Thanks for your reply, hadn't seen these methods.  Much appreciated..

Tags (1)