# SimpleTagProvider

**URL:** <https://forum.inductiveautomation.com/t/simpletagprovider/6116>\
**Category:** 3rd Party Modules\
**Created:** [March 28, 2013, 4:36am UTC](https://forum.inductiveautomation.com/t/simpletagprovider/6116 "2013-03-28T04:36:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [March 28, 2013, 4:36am UTC](https://forum.inductiveautomation.com/t/simpletagprovider/6116/1 "2013-03-28T04:36:45Z")

</div>

I have created a simple tag provider, but the SQLTags it creates are not editable in the SQLTag browser in the designer, nor do they appear to be updatable via scripting with system.tag.wirite(). I would like both of these capabilities to be enabled.

I configured the provider/tags as follows:

```auto
provider = new SimpleTagProvider(providerName);
provider.configureTagType(TagType.Custom, TagEditingFlags.STANDARD_STATUS null);
```

I also tried (to no effect):

```auto
provider.configureTagType(TagType.Custom, TagEditingFlags.STANDARD_STATUS.or(TagEditingFlags.SUPPORTS_VALUE_EDIT), null);
```

I wasn’t sure of which TagEditingFlags I need, nor whether they should be and’d or or’d.

—chuck

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [March 29, 2013, 6:23pm UTC](https://forum.inductiveautomation.com/t/simpletagprovider/6116/2 "2013-03-29T18:23:50Z")

</div>

Hi,

I think that the only problem might be that you’re probably not calling [tt]SimpleTagProvider.configureTag()[/tt] for each tag, to link it to that “Tag type” that you’ve defined. And then, for writing, you need to register a “WriteHandler” to do something with the value (remember, you’re driving all of the tag values, so the system doesn’t know what a write means. In the simplest case, your write handler will then just turn around and call “updateValue” for the tag).

So, to summarize:

1. Configure the “type” TagType.Custom as you were, using TagEditingFlags.STANDARD\_STATUS.
2. For each tag, call [tt]configureTag(path, dataType, TagType.Custom)[/tt]
3. Create a write handler, and for each tag that you want to make writable, call [tt]registerWriteHandler(path, handler)[/tt]

Hope this helps,

---

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [April 3, 2013, 1:41pm UTC](https://forum.inductiveautomation.com/t/simpletagprovider/6116/3 "2013-04-03T13:41:33Z")

</div>

Thanks that helps. Works just fine. I appreciate the explanation - I just didn’t see why I needed a WriteHandler when I could just as easily call the updateTag method directly — and the reason is so that system.tag.write() will work.  
– chuck
