# Some inconsistencies with tag paths

**URL:** <https://forum.inductiveautomation.com/t/some-inconsistencies-with-tag-paths/86494>\
**Category:** Module Development\
**Created:** [February 28, 2024, 10:56am UTC](https://forum.inductiveautomation.com/t/some-inconsistencies-with-tag-paths/86494 "2024-02-28T10:56:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![christofer.dutz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/christofer.dutz/32/76634_2.png) [@christofer.dutz](https://forum.inductiveautomation.com/u/christofer.dutz)\
**Post date:** [February 28, 2024, 10:56am UTC](https://forum.inductiveautomation.com/t/some-inconsistencies-with-tag-paths/86494/1 "2024-02-28T10:56:07Z")

</div>

HI,

I am making quite some progress with my Apache IoTDB tag historian, but currently struggling with a problem, that hopefully you folks here can provide some insights on.

I implemented the browse method of my history-provider and it nicely shows the tree of the data stored in IoTDB. However as soon as I pull over the tag in a report, it's path gets trucated to only contain the first path segment.

 ![20240228-114652](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/1/c11fe33b0d17097da1560c8355eb34bab93f21cd.jpeg)

When the query executes, I only get the first two path segments even if I pulled one containing 4 over in the editor.

I'm using this code to create the results for each element of the tree:

```python
                results.add(new BasicResult(root.extend("tag", childPath), hasChildren));

```

This results in this structure:

 ![20240228-115220](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/c/4c92b29b635b057154ae7ee413caf8c5645a5c63.jpeg)  
But in the createQuery and as you can see in the editor window in the Tag path column all I get are the first two path elements.

I tried creating a new QualifiedPath containng the original information in path element 0 and by appending "/{childName}" to the second path, but the Parser then creates 2 path elements one with "tag":"parentName" and one with null:"childName", so we're back to where I started.

Any suggestions on how to do this right?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 28, 2024, 12:43pm UTC](https://forum.inductiveautomation.com/t/some-inconsistencies-with-tag-paths/86494/2 "2024-02-28T12:43:32Z")

</div>

Not sure. When rendered, all of the `tag:` parts should end up reported together, delimited by `/`. Have you tried playing with the QualifiedPath parser?

---

<div class="post-metadata">

**Author:** ![christofer.dutz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/christofer.dutz/32/76634_2.png) [@christofer.dutz](https://forum.inductiveautomation.com/u/christofer.dutz)\
**Post date:** [February 28, 2024, 1:09pm UTC](https://forum.inductiveautomation.com/t/some-inconsistencies-with-tag-paths/86494/3 "2024-02-28T13:09:58Z")

</div>

I did simply switch to generate them concatenated by appending {old-part}"." + {new-part} ... doesn't look pretty, but seems to pass the information I need.

As you can see something seems to be different with the way I built the paths as Ignition is only showing the first part in the editor.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 28, 2024, 1:12pm UTC](https://forum.inductiveautomation.com/t/some-inconsistencies-with-tag-paths/86494/4 "2024-02-28T13:12:38Z")

</div>

The `:/tag:` delimiter should only exist once in the string render of a `QualifiedPath`. Find out why yours show repeats.

---

<div class="post-metadata">

**Author:** ![christofer.dutz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/christofer.dutz/32/76634_2.png) [@christofer.dutz](https://forum.inductiveautomation.com/u/christofer.dutz)\
**Post date:** [February 28, 2024, 3:51pm UTC](https://forum.inductiveautomation.com/t/some-inconsistencies-with-tag-paths/86494/5 "2024-02-28T15:51:32Z")

</div>

So what would be the id of the following parts?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 28, 2024, 3:56pm UTC](https://forum.inductiveautomation.com/t/some-inconsistencies-with-tag-paths/86494/6 "2024-02-28T15:56:50Z")

</div>

They wouldn't have their own IDs. They'd be merged with the first `:tag:/` with `/` separators.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 28, 2024, 4:57pm UTC](https://forum.inductiveautomation.com/t/some-inconsistencies-with-tag-paths/86494/7 "2024-02-28T16:57:50Z")

</div>

I think you need to be modifying your `childPath` (assuming it's an instance of `TagPath`, e.g. `childPath.getChildPath("next")`), not always adding new `tag` elements to `root`.
