# Retrieve default tag provider

**URL:** <https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081>\
**Category:** Module Development\
**Created:** [January 10, 2024, 10:05pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081 "2024-01-10T22:05:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathias\_Melling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mathias_melling/32/67682_2.png) [@Mathias\_Melling](https://forum.inductiveautomation.com/u/Mathias_Melling)\
**Post date:** [January 10, 2024, 10:05pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/1 "2024-01-10T22:05:15Z")

</div>

Is there a way to use the Ignition's project default tag provider in my module? Not a provider with the name "default", but the provider that is selected as default under Project Properties.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/3/c3b6fe1cfd03c50f8038ff7d5e78c0e9e12dfbcd.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 10, 2024, 10:09pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/2 "2024-01-10T22:09:52Z")

</div>

From what scope (Gateway or Client/Designer) do you need to figure this out?

---

<div class="post-metadata">

**Author:** ![Mathias\_Melling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mathias_melling/32/67682_2.png) [@Mathias\_Melling](https://forum.inductiveautomation.com/u/Mathias_Melling)\
**Post date:** [January 10, 2024, 10:11pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/3 "2024-01-10T22:11:15Z")

</div>

Gateway scope

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 10, 2024, 10:12pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/4 "2024-01-10T22:12:01Z")

</div>

Ok, with a reference to `GatewayContext`, try something like:

```java
String defaultProvider = context.getProjectManager()
  .getProjectProps(projectName)
  .getDefaultSQLTagsProviderName();

```

---

<div class="post-metadata">

**Author:** ![Mathias\_Melling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mathias_melling/32/67682_2.png) [@Mathias\_Melling](https://forum.inductiveautomation.com/u/Mathias_Melling)\
**Post date:** [January 10, 2024, 10:32pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/5 "2024-01-10T22:32:21Z")

</div>

Wouldn't I have to hardcode the `projectName` this way?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 10, 2024, 10:33pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/6 "2024-01-10T22:33:31Z")

</div>

You have to provide one somehow. The default tag provider is defined within the context of a project.

---

<div class="post-metadata">

**Author:** ![Mathias\_Melling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mathias_melling/32/67682_2.png) [@Mathias\_Melling](https://forum.inductiveautomation.com/u/Mathias_Melling)\
**Post date:** [January 10, 2024, 10:34pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/7 "2024-01-10T22:34:17Z")

</div>

😢

---

<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:** [January 10, 2024, 10:46pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/8 "2024-01-10T22:46:49Z")

</div>

What are you trying to do, exactly?

Is this related to your other post about a tag reading scripting function?

---

<div class="post-metadata">

**Author:** ![Mathias\_Melling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mathias_melling/32/67682_2.png) [@Mathias\_Melling](https://forum.inductiveautomation.com/u/Mathias_Melling)\
**Post date:** [January 11, 2024, 2:17pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/9 "2024-01-11T14:17:06Z")

</div>

I think I actually have it figured out, at least in my head. But yes, it's related to that other post. So from the client scope I'm sending a remote procedure call (rpc) to the gateway to give me the values of some tags. In that call, I simply have to include the default tagProvider name of the client and that should solve my problem.

The code in the client scope would look something like this:

```auto
String tagProvider = context.getDefaultTagProviderName();
List<QualifiedValue> values = rpc.readGatewayTags(tags,tagProvider)

```

context in this case would be the ClientContext.

---

<div class="post-metadata">

**Author:** ![Mathias\_Melling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mathias_melling/32/67682_2.png) [@Mathias\_Melling](https://forum.inductiveautomation.com/u/Mathias_Melling)\
**Post date:** [January 11, 2024, 9:26pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/10 "2024-01-11T21:26:49Z")

</div>

How do I get access to the `Vision Client Tags` tag browser?  
I tried:

```auto
ClientTagManager tagManager = ClientHook.context.getTagManager();
ClientTagProvider provider = tagManager.getDefaultProvider();

```

But that returns the provider I have set as my default under project properties.

---

<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:** [January 11, 2024, 11:10pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/11 "2024-01-11T23:10:17Z")

</div>

The Vision client tag provider:

1. Only exists in the Vision client scope, by definition.
2. Doesn't implement modern access methods or the "new" tag interfaces for 8.0+.
3. Is always hardcoded to a provider ID of `client`.

---

<div class="post-metadata">

**Author:** ![Mathias\_Melling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mathias_melling/32/67682_2.png) [@Mathias\_Melling](https://forum.inductiveautomation.com/u/Mathias_Melling)\
**Post date:** [January 12, 2024, 3:16pm UTC](https://forum.inductiveautomation.com/t/retrieve-default-tag-provider/84081/12 "2024-01-12T15:16:02Z")

</div>

Using `client` as the provider name works. Thanks
