Ad Widget

Collapse

check if the value of a string item is an empty string?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • whaleff
    Junior Member
    • Sep 2023
    • 3

    #1

    check if the value of a string item is an empty string?

    and replace empty by 0 with regular expression
    it is attached but it is returning error
    ​​
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    that strlen() thing will not work there anyway... Its not a regex... It is taken literally and of course it will not match

    you should look for JS preprocessing

    blah = value.match(/^$/) ? 0 : value
    return blah

    Comment

    Working...