Check If a Tag Is Used Before Deleting or Renaming


Not sure if this is possible but it would be useful if a check would be done to see if a tag is used in the project before Deleting or Renaming


1 Like

Alternatively could we generate a list or highlight orphaned tags that aren’t being used?


That is another good request. I suppose what I am looking for is similar to what a Control Logix can do. It will not allow a Tag to be deleted that is in use and also it will generate a list of all unused tags


I think it would be impossible to make an accurate list of which tags are used or not used since tagnames can be constructed on the fly within scripts and through parameter passing to template windows.

I think you might be confusing the difference between a variable and a tag…

[quote=“gbuehler”]I think you might be confusing the difference between a variable and a tag…[/quote] Not necessarily. An example is here where tags are created via scripting. The problem that I see is that a tag can be used anywhere, across projects and even across servers, making it difficult to know exactly where a tag is being used.

I retract my previous statement :blush:

Don’t sweat it. I’ll admit that it was an odd duck of an application. But it does show that if it can be done externally (not necessarily through Ignition) to a database, it can also happen to a tag. Learned that one the hard way, once. I had one script to giveth a tag and one script to taketh away. :laughing:


PLEASE!!! what this is absolutely necessary, and listed by project too!!!

Sadly I still don’t see any good way to check if tags are used or not. I have a number of Ignition gateways where the tags have become a dumping ground for all kinds of randomness. I would love to find out what’s actually being used or not so it could be cleaned up.

With new projects I have started creating new tag providers that are specific to a particular project. That way at least where something is used can be narrowed down in the future. That doesn’t really help me now though.

Tags can be bound to screen elements, can use indirect addressing and tag addresses can be generated by scripting.This certainly makes it challenging to find where the writes are coming from. I was thinking the Audit Log or something similar could be of use here. Since the Audit Log keeps track of what tags were written to, not finding a tag in there is good indication that it’s not setup to be written to (although not proof). As far as I can tell there’s nothing similar keeping track of tag reads so any tag which just monitors data can’t be determined this way.

You’ve identified the crux of the issue: due to dynamic reading and writing (indirect), there is no way to determine 100% whether a tag is used or not. Even auditing may not be 100%, as there could always be some component which hasn’t met the write condition.

Separating tags by project is the practice I recommend, but you’re correct that it doesn’t solve troublesome decisions from the past.

The Find/Replace functionality can be used as a starting point, but - again - dynamic reading/writing could always sneak up on you.

If tags date stamped when if was last read it would be the only solution to indirect tags I can think of

1 Like

I agree this would be really useful and wonder how reasonable it would be for IA to implement.