Community discussions

MikroTik App
 
keith
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Thu May 24, 2007 12:30 am

Can you display OID_column in a column instead of a row?

Fri Oct 23, 2009 9:54 pm

I would like to display the value of an oid_column as a column instead of a row in a devices appearance. I put in the appearance [oid-column(".......")] and the dvice label shows item1, item 2, item 3, etc. I would like it to dispaly
item1
item2
item3

Is that possible?
 
User avatar
sady
Frequent Visitor
Frequent Visitor
Posts: 84
Joined: Fri Jul 11, 2008 11:30 am
Location: Russia

Re: Can you display OID_column in a column instead of a row?

Wed Dec 02, 2009 9:24 pm

yes. Look at following function(it's remove empty fields as well):
if(string_size(oid_column("1.3.6.1.4.1.9.2.9.2.1.18")) > 0,
concatenate(

concatenate(
	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),0)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),0),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),1)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),1),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),2)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),2),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),3)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),3),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),4)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),4),"
"),"")
),
concatenate(

	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),5)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),5),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),6)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),6),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),7)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),7),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),8)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),8),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),9)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),9),"
"),"")
),
concatenate(

	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),10)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),10),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),11)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),11),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),12)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),12),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),13)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),13),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),14)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),14),"
"),"")
),
concatenate(

	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),15)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),15),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),16)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),16),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),17)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),17),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),18)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),18),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),19)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),19),"
"),"")
),
concatenate(

	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),20)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),20),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),21)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),21),"
"),"")
,	if (string_size(
		array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),22)) > 0,
		concatenate(array_element(oid_column("1.3.6.1.4.1.9.2.9.2.1.18"),22),"
"),"")

)

)
,"")
Please, please, Open Dude Source! Pleaaaaseeeee!!!!!
 
keith
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Thu May 24, 2007 12:30 am

Re: Can you display OID_column in a column instead of a row?

Tue Dec 08, 2009 1:42 am

Thanks for that solution Here is what i ended up doing, I am not sure which one is better. I think yours is because it is more flexible. Basically i put spaces between the oid on the same line then after the RSSI OID i put a carriage return. But it only lists eight lines


[Device.FirstDnsName]
[Device.AddressesCommaList]
[Device.MacAddressesCommaList]

AP Name MAC RSSI
[oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.3.1")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.2.1")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.6.1")]
[oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.3.2")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.2.2")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.6.2")]
[oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.3.3")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.2.3")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.6.3")]
[oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.3.4")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.2.4")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.6.4")]
[oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.3.5")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.2.5")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.6.5")]
[oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.3.6")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.2.6")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.6.6")]
[oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.3.7")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.2.7")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.6.7")]
[oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.3.8")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.2.8")] [oid("1.3.6.1.4.1.11.2.14.11.6.4.1.1.21.1.1.6.8")]

Who is online

Users browsing this forum: No registered users and 11 guests