Ad Widget

Collapse

Get a value from another template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • console
    Junior Member
    • Jul 2015
    • 15

    #1

    Get a value from another template

    Hi!

    It it possible to get a value from another template to use in trigger?

    For example, both expressions doesn'twork

    Code:
    {Template MongoDB-mongostat:mongodbstat[{$MONGODB_SERVER},{$MONGODB_PORT},{$DBNAME01},db.stats,dataSize].last()} <= {{HOST.NAME}:vm.memory.size[total].last()}
    or
    Code:
    {Template MongoDB-mongostat:mongodbstat[{$MONGODB_SERVER},{$MONGODB_PORT},{$DBNAME01},db.stats,dataSize].last()} <= {Template OS Linux - extended:vm.memory.size[total].last()}=0
  • welreini
    Junior Member
    • Sep 2019
    • 1

    #2
    Since this is tagged XSLT 2.0, myloweslife the match="Item" template from @TechBreak can be replaced by
    Code:
     <xsl:template match="Item">     <MsgId>         <xsl:value-of select="substring(             if (DisplayId != '')              then DisplayID              else Test/ID, 1 ,35)"/>     </MsgId> </xsl:template>
    (Note character counting starts from 1)
    Last edited by welreini; 20-09-2019, 07:14.

    Comment

    Working...