Word is in Model

Hi there,

why:

:global model [/system routerboard get model]
:if ( “SXT” in $model ) do={ :put “SXT-is-in-da-house”;} else={ :put “no-SXT”;}

not working?
Can everyone please help?

best regards
christian

:if ($model~“SXT”) do={…}

I suggest:

  1. to use full syntax;
  2. not use less understandable syntax like “~”, and non english keyboard do not have this symbol, and on terminal ALT+123 not work.
:global model value=[/system routerboard get value-name="model"];
:if ([:find $model "SXT" -1] >= 0) do={ :put "SXT-is-in-da-house" } else={ :put "no-SXT" }