Community discussions

MikroTik App
 
markdutton
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
Joined: Fri Sep 24, 2010 4:59 am

Parsing a variable to a function in Dude labels

Fri Jan 31, 2025 7:02 am

I have tried to use a variable as a parameter to a function in dude labels.

E.G. The label for Interface.Name in my case is <pppoe-Suite10>. I want to use the string_substring function [string_substring([Interface.Name],7)].
However, I get the result [string_substring(<pppoe-Suite10>,7)]
It expands the variable, but the function around it just becomes text.
Is it possible to create this function the way I want it to?
 
teslasystems
newbie
Posts: 47
Joined: Sun Aug 09, 2015 3:00 pm

Re: Parsing a variable to a function in Dude labels

Sat Feb 01, 2025 7:28 am

Unfortunately, it doesn't work.
If your link is using SNMP, you can try to workaround by using [string_substring(oid("oid of your interface name"),7)], but not sure if this makes sense, because each link will have its own oid and you will need to edit it on each link individually.