Community discussions

MikroTik App
 
AnAnAs
newbie
Topic Author
Posts: 25
Joined: Fri Apr 13, 2018 11:08 pm
Location: France

The Dude link Label apparence probleme Ros_command with as-value

Mon Apr 20, 2020 2:49 pm

Hello,

I don't understand why The Dude does not display the result of this command with as-value

With Winbox
[admin@SW1] > :put ([interface ethernet monitor sfpplus1 once as-value]->"sfp-vendor-part-number")    
S+85DLC03D


With label The Dude
[ros_command(":put ([interface ethernet monitor sfpplus1 once as-value]->"sfp-vendor-part-number")")]


In the Dude
1.PNG




But now, if you delete as-value, it's OK
[ros_command(":put ([interface ethernet monitor sfpplus1 once])")]


In the Dude
2.PNG
Do you know why ?
I also tested with the very latest version.
You do not have the required permissions to view the files attached to this post.
 
AnAnAs
newbie
Topic Author
Posts: 25
Joined: Fri Apr 13, 2018 11:08 pm
Location: France

Re: The Dude link Label apparence probleme Ros_command with as-value

Wed Apr 22, 2020 4:36 pm

Hi All,
Perhaps,
to be more clear I only want to display a value in the monitor function.

Thx for your Feedback
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: The Dude link Label apparence probleme Ros_command with as-value  [SOLVED]

Thu Apr 23, 2020 10:53 am

I'd say it's about your double quotes - the "inner" double quotes need to be escaped.
try this:
[ros_command(":put ([interface ethernet monitor sfpplus1 once as-value]->\"sfp-vendor-part-number\")")]
 
AnAnAs
newbie
Topic Author
Posts: 25
Joined: Fri Apr 13, 2018 11:08 pm
Location: France

Re: The Dude link Label apparence probleme Ros_command with as-value

Thu Apr 23, 2020 12:48 pm

Perfect,
Thx for your help
3.png
You do not have the required permissions to view the files attached to this post.
 
linas
just joined
Posts: 9
Joined: Mon Jul 12, 2010 8:17 pm

Re: The Dude link Label apparence probleme Ros_command with as-value

Wed Mar 24, 2021 3:08 pm

Hi
Is any chance to use global variable, witch is in mikrotik (not dudes) memory in ros_comman?
ros_command("/tool fetch url=sftp://x.x.x.x/DudeNew/files/backups/$variable user=user password=pass upload=yes src-path=export.rsc ")

Ok, found problem: ros_command("/tool fetch url=\"sftp://x.x.x.x/DudeNew/files/backups/$variable\" user=user password=pass upload=yes src-path=export.rsc ")

Who is online

Users browsing this forum: No registered users and 10 guests