# QualifiedPath to regular tag path

**URL:** <https://forum.inductiveautomation.com/t/qualifiedpath-to-regular-tag-path/91311>\
**Category:** Module Development\
**Created:** [June 3, 2024, 8:53pm UTC](https://forum.inductiveautomation.com/t/qualifiedpath-to-regular-tag-path/91311 "2024-06-03T20:53:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asjal\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Asjal\_Ahmad](https://forum.inductiveautomation.com/u/Asjal_Ahmad)\
**Post date:** [June 3, 2024, 8:53pm UTC](https://forum.inductiveautomation.com/t/qualifiedpath-to-regular-tag-path/91311/1 "2024-06-03T20:53:27Z")

</div>

For a historical tag, how can I convert a QualifiedPath like this  
`histprov:Sample_SQLite_Database:/drv:ignition-2023lt-c3faby3-:sample_tags:/tag:realistic/realistic0`

to a regular tag path:  
`[Sample_SQLite_Database]realistic/realistic0`

---

<div class="post-metadata">

**Author:** ![Brandon\_Peterson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/brandon_peterson/32/32960_2.png) [@Brandon\_Peterson](https://forum.inductiveautomation.com/u/Brandon_Peterson)\
**Post date:** [June 3, 2024, 9:54pm UTC](https://forum.inductiveautomation.com/t/qualifiedpath-to-regular-tag-path/91311/2 "2024-06-03T21:54:13Z")

</div>

`QualifiedPath`'s are just a set of properties strung together. In your case, `histprov`, `drv`, and `tag` are your property names, and `Sample_SQLite_Database`, `ignition-2023lt-c3faby3-:sample_tags`, and `realistic/realistic0` are their respective property values. If it were in a json format, it might look like this\*:

```json
{
	"histprov": "Sample_SQLite_Database",
	"drv": "ignition-2023lt-c3faby3-:sample_tags",
	"tag": "realistic/realistic0"
}

```

_\*I'm not sure if `:sample_tags` means something special here or not, but it shouldn't matter for our purposes._

The general format I've found is this:  
`key1:value1:/key2:value2 ...`

But, after looking at the docs, it looks like all we need to do is use the `QualifiedPathUtils` class:

> **[QualifiedPathUtils](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.41/com/inductiveautomation/ignition/common/QualifiedPathUtils.html#toStringFromHistoricalPath(com.inductiveautomation.ignition.common.QualifiedPath))**
>
> declaration: package: com.inductiveautomation.ignition.common, class: QualifiedPathUtils

Specifically, the function I think you're looking for already exists:

```java
import com.inductiveautomation.ignition.common.QualifiedPathUtils;
import com.inductiveautomation.ignition.common.QualifiedPath;

public class HistoricalTagPathExample {

	public static void main(String[] args) {
		// Assuming myQualifiedPath is already defined as a QualifiedPath object
		QualifiedPath myQualifiedPath = ...; // Initialize this with an appropriate value

		// Convert the QualifiedPath to a String for a historical path
		String myHistoricalTagPath = QualifiedPathUtils.toStringFromHistoricalPath(myQualifiedPath);

		// Print the result
		System.out.println("Historical Tag Path: " + myHistoricalTagPath);
	}
}

```

_Throw this in your bookmark folder. You're going to want to use it a lot: [Overview](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.41/index.html)_

---

<div class="post-metadata">

**Author:** ![Asjal\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Asjal\_Ahmad](https://forum.inductiveautomation.com/u/Asjal_Ahmad)\
**Post date:** [June 4, 2024, 2:48pm UTC](https://forum.inductiveautomation.com/t/qualifiedpath-to-regular-tag-path/91311/3 "2024-06-04T14:48:30Z")

</div>

Thank you! I tried looking for a pre-existing function in the docs to help me with this, but I could not find it. Could you suggest a strategy I can use to help me find stuff like this faster in the future?

---

<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:** [June 4, 2024, 3:18pm UTC](https://forum.inductiveautomation.com/t/qualifiedpath-to-regular-tag-path/91311/4 "2024-06-04T15:18:21Z")

</div>

Our SDK docs are very inadequate - mostly because the subject matter experts are too busy making Ignition to contribute the necessary time to the docs and/or disseminate knowledge among the technical writing staff.

We're hoping to do a better job with 8.3.0, at least setting a standard for _new_ functionality documentation that we can then expand over time to the rest of Ignition, or at least the more commonly exercised portions.

This forum is your best resource for SDK questions, by far.

---

<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:** [June 4, 2024, 3:22pm UTC](https://forum.inductiveautomation.com/t/qualifiedpath-to-regular-tag-path/91311/5 "2024-06-04T15:22:10Z")

</div>

> [@Asjal\_Ahmad](#):
>
> I tried looking

Did you try putting "QualifiedPath" in the javadocs' search field?

That search field is where I start with any class name I encounter anywhere else. Then follow linked javadocs that look potentially helpful.
