Using system.tag.browse with relative path

I’m trying to browse a folder to find the tags configured in that folder. The script is executed in the Value Changed Event of a tag that is in an adjacent level from the path I wish to browse.


The Event Script is in “ParseTag” from “CtrlFolder” and I want to browse for tags in “MachineFolder”… My code looks like this:

path = "[.]../MachineFolder"
tagsData = system.tag.browse(path)

Normally, I should get a dictionnary containing data for “MachineTag1” and “MachineTag2” but there is an error in the Gateway Logs : Error browsing tags through scripting

Can anyone help?


java.util.concurrent.ExecutionException: java.lang.Exception: provider not found: .

at java.base/java.util.concurrent.CompletableFuture.reportGet(Unknown Source)

at java.base/java.util.concurrent.CompletableFuture.get(Unknown Source)

at com.inductiveautomation.ignition.gateway.script.GatewayTagUtilities.browseImpl(

at com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities.browse(

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)


at com.inductiveautomation.ignition.common.script.ScriptManager$



at org.python.pycode._pyx21291.valueChanged$1(:49)

at org.python.pycode._pyx21291.call_function()



at org.python.core.PyFunction.function___call__(



at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(

at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(

at com.inductiveautomation.ignition.gateway.tags.scripting.TagScriptManagerImpl$


at com.inductiveautomation.ignition.gateway.tags.scripting.TagScriptManagerImpl$Task.invoke(

at com.inductiveautomation.ignition.gateway.tags.scripting.TagScriptManagerImpl$

at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$

at java.base/java.util.concurrent.Executors$ Source)

at java.base/ Source)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)

at java.base/ Source)

Caused by: java.lang.Exception: provider not found: .

at com.inductiveautomation.ignition.gateway.tags.model.impl.GatewayTagManagerImpl.browseAsync(

… 30 common frames omitted

FWIW, I would strongly recommend against browsing tags in a tag event script.

looks like the browse function doesn’t know the provider. I would say you probably need to provide the fully qualified tag path.

Thanks @lrose
Yes! That was the problem. If I change the [.] part for [MyProvider], it works.
Is it possible to retrieve the provider using the Event parameters in some way?
I use a tag event on a tag that I know will not change very often. It’s a trigger of some sort.
The script in this event parses the structure and generates a json string with the key being the tag name. That json is passed to a database stored procedure. So if the structure is changed in the PLC, the json adapts automatically.
What do you suggest to replace the Event Script with something more secure?
Thanks for your help!

Generally, since you are storing this in a DB, I would tend to recommend a Gateway Timer Event. The event would then check the PLC’s copy of the structure against the DB copy and then choose to record a change or not.

You could also achieve this with a Gateway Tag Change Event on a Trigger Tag, then the device could be responsible for triggering the database operation.

It’s less about security and more about execution time. Tag event scripts run in a limited thread pool, so best practice is to not execute potentially long running tasks there. Doing so can lead to missed events.

Here is a discussion on the topic.

1 Like

Thanks @lrose! This will help! Case closed!