Issue Accessing Project Library Functions in Tag “Value Changed” Script

Hi team,

I’m trying to access some project library functions from a Tag Value Changed script. While writing the code in the editor, it shows the list of all functions from that library, but when the tag value actually changes at runtime, the functions do not execute.

Has anyone experienced this before or knows how to properly access project libraries from tag scripts?

Thanks in advance for your help!

Do you have the project containing the scripts identified in the gateway config settings as the Global Script project?

2 Likes

That would be the field. You need to put the project name there that contains the scripts you want to run from tags. Tags are in the gateway scope, so they can't just run random scripts from random projects.

So i can use only one project at a time?

As the global project script library, yes. Anything you need to be able to access from anywhere needs to be in that project. hence why many simply make a project called "global" that they just use for global accessible scripts.

Individual projects can have their own scripts as well, but they can't be used by tags.

1 Like

Thanks a lot.

If you must target multiple projects, you can explore the use of message handlers.