# Binding Easy Chart Pen Names to SQLTag Names

**URL:** <https://forum.inductiveautomation.com/t/binding-easy-chart-pen-names-to-sqltag-names/6723>\
**Category:** Ignition\
**Created:** [June 17, 2013, 7:33pm UTC](https://forum.inductiveautomation.com/t/binding-easy-chart-pen-names-to-sqltag-names/6723 "2013-06-17T19:33:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul.prescott](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@paul.prescott](https://forum.inductiveautomation.com/u/paul.prescott)\
**Post date:** [June 17, 2013, 7:33pm UTC](https://forum.inductiveautomation.com/t/binding-easy-chart-pen-names-to-sqltag-names/6723/1 "2013-06-17T19:33:08Z")

</div>

OS: Windows 7 Enterprise  
Ignition: 7.3.1 (b496)  
Java: 1.6.0\_23

What I’m trying to do is create a chart to display historical temperature data from one (out of many) furnaces. Rather than create one chart per furnace, I would like to create one chart that can dynamically display the data for any one furnace at a time. From the Ignition documentation and my searches in this Forum, keeping the pen names in a SQL database and then linking them to the Easy Chart ‘Tag Names’ dataset seems like a good way to achieve this.

I’ve created a SQL database that lists each furnace along with its SQLtag names and a Group name (for organizing the pens in Easy Chart):

```auto
MachineNumber TagName GroupName
9563 Pre Heat 1 grp_Pre_Heat
9563 Pre Heat 2 grp_Pre_Heat
9563 Pre Heat 3 grp_Pre_Heat
  : : :
9563 High Heat 1 grp_High_Heat
9563 High Heat 2 grp_High_Heat
9563 High Heat 3 grp_High_Heat
  : : :
10006 RBO grp_Pre_Heat
10006 Zone 1 grp_Pre_Heat
10006 Zone 2 grp_High_Heat
10006 Zone 3 grp_High_Heat
10006 Zone 4 grp_High_Heat
  				      : :
```

The SQLTag names are of the form MachineNumber/TagName. The question I have is what is the best method to transfer or bind the MachineNumber/TagName to the TAG\_PATH column of the ‘Tag Names’ dataset?

I think that I could achieve this with Python by copying, replacing, and copying back the ‘Tag Name’ dataset, but it seems like there should be an easier method.

Thanks

---

<div class="post-metadata">

**Author:** ![paul.prescott](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@paul.prescott](https://forum.inductiveautomation.com/u/paul.prescott)\
**Post date:** [June 24, 2013, 3:05pm UTC](https://forum.inductiveautomation.com/t/binding-easy-chart-pen-names-to-sqltag-names/6723/2 "2013-06-24T15:05:40Z")

</div>

After examing the Click-to-Graph extra, I’ve implemented a system similar whereby I have a tables in a SQL database that mirror the Easy Chart datasets (‘Tag Pens’, ‘Axes’, and ‘Subplots’). I then added another column for my FURNACE\_NUMBER and then select the pens using a SELECT FROM query with a WHERE [FURNACE\_NUMBER] = {Root Container.FurnaceNumber} statement with the {Root Container.FurnaceNumber} being passed in when the chart window is opened.

So my question now is whether this is considered an efficient method for dynamically selecting chart pens, or is their a better method?

Thank you.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [August 13, 2013, 4:06pm UTC](https://forum.inductiveautomation.com/t/binding-easy-chart-pen-names-to-sqltag-names/6723/3 "2013-08-13T16:06:10Z")

</div>

This is absolutely a fine method, just make sure to have the binding that brings in the pens set to polling-off.
