# How bind to a client dataset tag

**URL:** <https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [April 1, 2020, 3:54am UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577 "2020-04-01T03:54:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![wpmccormick](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wpmccormick/32/13940_2.png) [@wpmccormick](https://forum.inductiveautomation.com/u/wpmccormick)\
**Post date:** [April 1, 2020, 3:54am UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577/1 "2020-04-01T03:54:49Z")

</div>

About a year ago, @alexlu said [here](http://forum.inductiveautomation.com/t/bug-12312-cannot-bind-direct-or-indirect-to-array-tag/21684/5?u=wpmccormick) that it should be possible to bind to a client dataset tag. It doesn’t seem to work with the suggested syntax. What should the magic syntax be?

---

<div class="post-metadata">

**Author:** ![alexlu](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alexlu/32/65795_2.png) [@alexlu](https://forum.inductiveautomation.com/u/alexlu)\
**Post date:** [April 1, 2020, 10:54pm UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577/2 "2020-04-01T22:54:47Z")

</div>

Hi Bill,

I just confirmed that the client dataset tag expression binding I suggested still appears to be working. Can you clarify the issue that you're seeing?

> [@\[BUG-12312\] Cannot bind (direct or indirect) to array tag](https://forum.inductiveautomation.com/t/bug-12312-cannot-bind-direct-or-indirect-to-array-tag/21684/5):
>
> {[Client]Dataset Tag}[row, col]

---

<div class="post-metadata">

**Author:** ![wpmccormick](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wpmccormick/32/13940_2.png) [@wpmccormick](https://forum.inductiveautomation.com/u/wpmccormick)\
**Post date:** [April 2, 2020, 1:49am UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577/3 "2020-04-02T01:49:04Z")

</div>

It’s a Vision Client Tag that is generated from an SQL Query expression. It is a Dataset[10Rx2C] where col1 is of type Integer and col2 is of type Long.

If I try to bind the value property of a Numeric Label to any col,row using [client]ActiveTasks[col,row] and I get the following error:

```auto
The type of this tag (Dataset) is not assignment-compatible with the type of the property you are binding to (double).

```

In the end end, I want to bind to to a background color with a Number-to-Color Translation.

Tag export attached.  
[client-tags.xml](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/81b4fbb3c4d05e6906cd523a8d29f618ade197db.xml) (2.0 KB)

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [April 2, 2020, 1:52am UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577/4 "2020-04-02T01:52:20Z")

</div>

Can you post the expression you are using for the binding on the Numeric Label?

---

<div class="post-metadata">

**Author:** ![wpmccormick](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wpmccormick/32/13940_2.png) [@wpmccormick](https://forum.inductiveautomation.com/u/wpmccormick)\
**Post date:** [April 2, 2020, 2:11am UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577/5 "2020-04-02T02:11:04Z")

</div>

[client]ActiveTasks[0,1]

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [April 2, 2020, 2:15am UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577/6 "2020-04-02T02:15:45Z")

</div>

Try:

```auto
{[client]ActiveTasks}[0,1]

```

I also tend to like putting in the column name instead of the column index. This way if you accidentally add a column to the dataset it is pulling from, you are less likely to end up with a potentially nasty hidden bug that doesn’t throw an error:

```auto
{[client]ActiveTasks}[0,"TaskCount"]

```

---

<div class="post-metadata">

**Author:** ![wpmccormick](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wpmccormick/32/13940_2.png) [@wpmccormick](https://forum.inductiveautomation.com/u/wpmccormick)\
**Post date:** [April 2, 2020, 2:20am UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577/7 "2020-04-02T02:20:39Z")

</div>

Okay, that woks but it needs to be in an expression. Thanks!

---

<div class="post-metadata">

**Author:** ![wpmccormick](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wpmccormick/32/13940_2.png) [@wpmccormick](https://forum.inductiveautomation.com/u/wpmccormick)\
**Post date:** [April 2, 2020, 2:30am UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577/8 "2020-04-02T02:30:01Z")

</div>

Also, it seems that specifying the column with a name does not seem to work when the expression is nested in an _if_ expression.

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [April 2, 2020, 2:55am UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577/9 "2020-04-02T02:55:22Z")

</div>

It works ok for me when I tried it in an if statement. I know sometimes I can get some weird type errors in various bindings but can usually fix it by wrapping it in a type casting function:

```auto
toDouble({[client]ActiveTasks}[0,"TaskCount"])

```

But this quick test works for me:

```auto
if(
     True,
     {[client]ActiveTasks}[0,"TaskCount"],
     -1
)

```

---

<div class="post-metadata">

**Author:** ![wpmccormick](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wpmccormick/32/13940_2.png) [@wpmccormick](https://forum.inductiveautomation.com/u/wpmccormick)\
**Post date:** [April 2, 2020, 3:09am UTC](https://forum.inductiveautomation.com/t/how-bind-to-a-client-dataset-tag/33577/10 "2020-04-02T03:09:54Z")

</div>

I was trying to do something like …

```auto
if(
     {[client]ActiveTasks}[0,"TaskCount"] > 0,
     color(1,1,1),
     color(100,100,100)
)

```

Anyway, I decided to use a _lookup_ function inside and _if_ functions.
