Hello,
I need to filter the Document type tags to only show in the Perspective - Tag Browse Tree component.
I've used the filterBrowseNode
script, as per the documentation here:
Perspective - Tag Browse Tree Scripting | Ignition User Manual.
The script is returning the correct results, but I need the following adjustments:
- Include only history-enabled tags.
- Exclude any empty tag folders.
Please let me know if this can be done by any other method.
# Print the node for debugging
system.perspective.print(node)
# Check if the node has a 'dataType' attribute or is a folder
if hasattr(node, 'dataType') and str(node.dataType) == 'Document':
# Return True if the dataType is 'Document'
return True
# Check if the node is a Folder
if hasattr(node, 'objectType') and str(node.objectType) == 'Folder':
return True
# If none of the above conditions are met, exclude the node
return False
Thanks in advance