Because I can never remember how this works, I find myself using the following expressions interchangibly in order to determine whether one or more matching items exist:
Code: Select all
:if ([:len [/interface find name=$interfaceName]] > 0) do={
:if ([/interface find name=$interfaceName] = "") do={
:if [/interface find name=$interfaceName] do={
Edit: Although I apparently can't invert the last option easily, because I "cannot logically negate nothing". Second option is just awkward. First option is a little long, but feels the most robust, as one would expect [find] to always return an array of results.