Community discussions

MikroTik App
 
jayhern
just joined
Topic Author
Posts: 3
Joined: Fri Apr 18, 2014 6:04 pm

Using Internal ID to reference original parameter

Fri May 08, 2015 8:51 pm

Can I get a value using the internal ID such as that used in this foreach loop?

:foreach IID in [/ip firewall address-list find list=bogons ] do {
:log [/ip firewall address-list get $IID list ]
}

I would like to be able to log the name of the list an action was performed on.
 
jayhern
just joined
Topic Author
Posts: 3
Joined: Fri Apr 18, 2014 6:04 pm

Re: Using Internal ID to reference original parameter

Fri May 08, 2015 10:00 pm

I found the syntax.

:foreach item in [/ip firewall address-list find where list="bogons"] do {
# String output can be parsed for id, address,disabled,dynamic, or list
:put [/ip firewall address-list get $item ];
}

Who is online

Users browsing this forum: GoogleOther [Bot], kormenator, sstefanov and 170 guests