Custom object tool - filter

Started by Egert143, November 06, 2020, 11:02:13 AM

Previous topic - Next topic

Egert143

Hello

What is the correct way to filter by multiple attributes ?

For example, show tool only when both attributeA and attributeB is present under custom attributes.

Egert

Filipp Sudanov

Currently object tool filter uses OR logic, if multiple custom attributes are specified.
Possible workaround could be to have a script in Configuration Poll hook, that would set custom attribute C if A and B are set.
Or if you need only two things to consider, you can use a custom attribute and adding nodes to a special empty templates - logic between several types of filters is AND.

AND logic between several custom attributes could be implemented somewhere in the future. It would be good if you could describe your use case in more details.

Egert143

Thanks for the info.

Currently i am trying to make few different versions of Mikrotik Winbox tool. Main difference is what user is being used and what ip is used to connect.

I used to have custom attributes like username, password, winbox and externalip. That combined gave tools like winbox and winbox (external). But now i am moving to radius and i wanna use current logged in user name to connect, but for that i need to define new custom attribute like radius.