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 ,

Maybe instead use [:len] to count the number of matching entries in the registration table. If there are more than 0, log it.
:if ([:len [/interface wireless registration-table find wds=no]] > 0) do={/log warning message=“connected”} else={:log warning message=“not conneced”}

thank you
didn’t know this command

Thanks!