finding WDS in registration-table

I want to know when a client connected to my WDS
this is what I have in the registration-table

/interface wireless registration-table print detail
0 interface=wlan1 mac-address=D4:DA:DD:D2:DB:DC ap=yes wds=yes bridge=no

1 interface=wlan1 mac-address=D4:DA:DD:D2:DB:D3 ap=no wds=no bridge=yes

so if he get wds=no I will know there is a client connected and send me log warning

this is what I have done , but I always get “not connected”

what am I missing?

if ([:tobool [/interface wireless registration-table find wds=no]]=true) do={/log warning message="connected"} else={:log warning message="not conneced"}

Thanks ,

this is what I have done
and it’s working

if ([/interface wireless registration-table find radio-name="unit2"] !="") do={log warning message="unit is connected";led led5=yes} else={log warning message="Unit2 not connected";led led5=no};

my question now is -
how can I make it work regardless to the name?
so If I forget to give the unit a name or write “unit22” by mistake - it will still do the same job?

Thanks ,