DX NetOps

 View Only

Expand all | Collapse all

SPECTRUM, How to save two values ​​of an event variable in two different attributes in the SpectroSERVER database?

  • 1.  SPECTRUM, How to save two values ​​of an event variable in two different attributes in the SpectroSERVER database?

    Posted Feb 12, 2026 05:45 PM
    How to save two values ​​of an event variable in two different attributes in the SpectroSERVER database?
     
    Good afternoon, I'd like to know how to save two values ​​of an event variable in two different attributes in the SpectroSERVER database. I tried the example at https://knowledge.broadcom.com/external/article/231030/how-to-save-the-value-of-an-event-variab.html and it works, but when I try to concatenate the second event variable into another attribute, I can't; it only displays one value.
     
    I've already reviewed examples of how to add more variables and tried them, but without success. Do you know how to do this, as I need to add 5 variables as attributes?
     
    Thanks, Community.
     
    Regards
    EventMessage and description varbinds
    EventDisps tried add two variables
    View news attributes


    -------------------------------------------


  • 2.  RE: SPECTRUM, How to save two values ​​of an event variable in two different attributes in the SpectroSERVER database?

    Posted Feb 12, 2026 08:49 PM
    I managed to do it with two variables using "and," however, I can't use more than two variables. I already tried with "if." Do you have a better idea of ​​how to solve this to create the attributes populated with the variables?
     
    Example:
    OK
    0xfff06288 A 3,0xfff06288,U,76620 P " And ( WriteAttribute( { C CURRENT_MODEL }, { H 0xffff0000 },GetEventVariable( { U 104 } )), WriteAttribute( { C CURRENT_MODEL }, { H 0xffff0001 },GetEventVariable( { U 108 } )), Nil()) "
    Failed, 3 attributes
    0xfff06288 A 3,0xfff06288,U,76620 P " if ( WriteAttribute( { C CURRENT_MODEL }, { H 0xffff0000 },GetEventVariable( { U 137 } )), WriteAttribute( { C CURRENT_MODEL }, { H 0xffff0001 },GetEventVariable( { U 108 })), WriteAttribute( { C CURRENT_MODEL }, { H 0xffff0002 },GetEventVariable( { U 109 } )),  Nil()) "
    Thanks, Community.
     
    Regards
    -------------------------------------------



  • 3.  RE: SPECTRUM, How to save two values ​​of an event variable in two different attributes in the SpectroSERVER database?

    Posted Feb 18, 2026 07:16 AM

    Hello Eduardo,

    maybe you could create a list (CreateList), add all the required event variables to it (AddTail) and then use a ForEach loop to call WriteAttribute for each element (GetElement). Of course the destination attributeIDs need to be part of the loop as well hence the order of values in the list matters.

    hope this helps,

    Raphael

    -------------------------------------------



  • 4.  RE: SPECTRUM, How to save two values ​​of an event variable in two different attributes in the SpectroSERVER database?

    Posted Feb 26, 2026 06:57 PM

    Hi Raphael

    Thanks for you answer, I'm going to use what you recommend.

    Regardas

    -------------------------------------------