How can I enable or disable a single node in a treeview?


I need to enable or disable a specific node in a treeview component based on the user role.
For example, if the user has Admin rights I want to enable all the nodes, and disable some according to their role

I was able to enable or disable the whole treeview component based on the role of the user, but not a single node or a set of nodes.
Any ideas in how to do this?
I read in a post that some used a query to do this, but there was not an example that I could follow to understand how.

I created the authorization profile in Ignition, not in a SQL database.

Thank you in advance for any help

Try using the filterTag() extension function.

Insert your own code to filter out the tags by user or group.


I do not see any extension function available for the tree view component

The Tree View Component does not have a filterTag() extension function. That is on the Tag Browse Tree component.

You will have to write your own custom Python code on the Tree View Component to make it work the way you want.

1 Like