# Get tag provider with {PathToParentFolder} in expression

**URL:** <https://forum.inductiveautomation.com/t/get-tag-provider-with-pathtoparentfolder-in-expression/26869>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [July 25, 2019, 9:28am UTC](https://forum.inductiveautomation.com/t/get-tag-provider-with-pathtoparentfolder-in-expression/26869 "2019-07-25T09:28:10Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![jsorlie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jsorlie/32/3645_2.png) [@jsorlie](https://forum.inductiveautomation.com/u/jsorlie)\
**Post date:** [April 20, 2023, 11:57pm UTC](https://forum.inductiveautomation.com/t/get-tag-provider-with-pathtoparentfolder-in-expression/26869/10 "2023-04-20T23:57:23Z")

</div>

> [@mcarritt1](#):
>
> I discussed it with Inductive support at one point and they agreed that they thought it was strange the provider isn’t there

Grrrr.... bumping this because, FWIW, the fully-qualified (tag provider) is still missing from the [pre-defined UDT parameters](https://docs.inductiveautomation.com/display/DOC81/UDT+Parameters#UDTParameters-Pre-DefinedParameters) eg. `{PathToParentFolder}`. One would think that at least one of the pre-defined param's would include this. Judging from my 7.x UDTs of days past, it was this way then....

My work-around relearned from @joseph.burns 's post:

```
udt	= tag['parameters']
tagProvider = tagPath[1:][:tagPath.find("]")-1]
fullyQualified = lambda t: '[%s]%s/%s' % (tagProvider, udt['PathToParentFolder'], t)
...
tagPaths = [
	fullyQualified('myMemberTag')	# "[.]myMemberTag"
]

```

My use-case is referencing UDT member tags within [`system.tag.readAsync()`](https://docs.inductiveautomation.com/display/DOC81/system.tag.readAsync) and [`writeAsync()`](https://docs.inductiveautomation.com/display/DOC81/system.tag.writeAsync) callback functions which only take the single `asyncReturn` argument. This relies on the callback()'s variable references having proper scope i.e. being hard-wired. @pturmel 's suggestion here [Pass parameter to tag.writeAsync](https://forum.inductiveautomation.com/t/question-how-do-i-use-readasync-to-read-tag-value/22008/7) would be more (sw)elegant..

> [@\[Question\] How do I use .readAsync to read tag value](https://forum.inductiveautomation.com/t/question-how-do-i-use-readasync-to-read-tag-value/22008/7):
>
> make semi-generic callbacks by creating jython classes that implement the ` __callable__ ` special method, and supply an instance as the callback. Have the ` __init__ ` method save the state you need to carry your logic forward.

---

_[View the full topic](https://forum.inductiveautomation.com/t/get-tag-provider-with-pathtoparentfolder-in-expression/26869)._
