Ad Widget

Collapse

Ignore empty macro value in Item Prototype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ZigbeeZabbix
    Junior Member
    • Oct 2018
    • 7

    #1

    Ignore empty macro value in Item Prototype

    I have an item prototype as follows: Interface {#FORTIIFNAME} {#IFDESCR}: Operational status. Is there a way to ignore macros with empty values? Some of my interfaces do not have descriptions and I'd like a conditional to exclude this macro if empty. While the current approach works, for interfaces with no description I get a space before the colon. If I remove the space between the macros, this results in a run-on of values for interfaces that do have a description. Alternatively, is it possible to add the space inside the macro call { #IFDESCR} so it only appears if the macro has a value (I have tried this and it results in the macro not working at all, but perhaps I have the incorrect syntax. Thank you!
Working...