# Indirect Tag History Binding in Perspective

**URL:** <https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [September 30, 2019, 6:04pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673 "2019-09-30T18:04:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitkarwa21](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@ankitkarwa21](https://forum.inductiveautomation.com/u/ankitkarwa21)\
**Post date:** [September 30, 2019, 6:04pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673/1 "2019-09-30T18:04:48Z")

</div>

I don’t see an option for indirect tag history binding in perspective.  
Am I missing something?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b68b1234425848fd56536cb03bd4dffbb70512e7.png)

---

<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:** [September 30, 2019, 7:23pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673/2 "2019-09-30T19:23:58Z")

</div>

The ‘Select Tags’ area lets you specify an expression to use, which will let you run an expression and bring in a dynamic list of tag paths.

---

<div class="post-metadata">

**Author:** ![ankitkarwa21](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@ankitkarwa21](https://forum.inductiveautomation.com/u/ankitkarwa21)\
**Post date:** [September 30, 2019, 7:40pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673/3 "2019-09-30T19:40:30Z")

</div>

@paul-griffith I tried using the expression to select the tags.  
However, I am getting an error when I am using the expression binding.  
To simplify, I just used a tag in both expression and direct binding.  
Direct binding works while expression gives an error for same tag.  
Am I using wrong syntax?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/fb6829948520dbd5465640510c7cd10eb2ecae79.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/995e48630c86b406b6261b706b8ce6a7214c3542.png)

---

<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:** [September 30, 2019, 8:01pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673/4 "2019-09-30T20:01:01Z")

</div>

That's not how it works. You need to build an array with the right structure for the tags you want to read, then the 'Expression' property in your actual tag history binding just needs to evaluate to the array. See the manual section on tag history bindings in Perspective:

> **[Tag History Bindings in Perspective | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/working-with-perspective-components/bindings-in-perspective/tag-history-bindings-in-perspective#using-dynamic-tag-paths)**
>
> Tag History Binding

---

<div class="post-metadata">

**Author:** ![ankitkarwa21](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@ankitkarwa21](https://forum.inductiveautomation.com/u/ankitkarwa21)\
**Post date:** [October 3, 2019, 3:41pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673/5 "2019-10-03T15:41:39Z")

</div>

Thanks @paul-griffith.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [October 2, 2023, 3:48pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673/6 "2023-10-02T15:48:16Z")

</div>

Thanks

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

I was able to use the array property Json.  
Then also I was able to bind an expression for the path in the custom property array path value.

`'[default]'+{view.custom.line}+'speed'`

Was trying to figure this out so long.

Then I also had a script to figure out the outfeed difference from the start in the transform on the history binding for the data on a time series chart.

```auto

prevData=system.dataset.toPyDataSet(value)
	valueHeaders= ['t_stamp','Outfeed']
	data=[]
	for row in range(value.getRowCount()):
		t_stamp= value.getValueAt(row,'t_stamp')		
		Outfeed= value.getValueAt(row,'Outfeed')-int(prevData[0][1])
		data.append([t_stamp,Outfeed])	
	
	data= system.dataset.toDataSet(valueHeaders,data)
	
	return data

```

So many pieces to finally get it to work.  
Ticks me off a bit because I think some power BI user is just going to drop something somewhere.  
For a fleeting moment I was happy to figure it out.

---

<div class="post-metadata">

**Author:** ![Gillian\_Carter](https://avatars.discourse-cdn.com/v4/letter/g/8edcca/32.png) [@Gillian\_Carter](https://forum.inductiveautomation.com/u/Gillian_Carter)\
**Post date:** [February 29, 2024, 9:14pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673/7 "2024-02-29T21:14:03Z")

</div>

Can you put the right format for his example in your response please. I am trying to do a similar thing, it worked for a regular tag binding to just do "[default]OEE/tag", but I still get a Error\_ExpressionEval with that and an error\_configuration when I tried [{"path": ""[default]OEE/tag"}] , but it isn't working

---

<div class="post-metadata">

**Author:** ![Cory.grube](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cory.grube/32/20476_2.png) [@Cory.grube](https://forum.inductiveautomation.com/u/Cory.grube)\
**Post date:** [February 29, 2024, 9:27pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673/8 "2024-02-29T21:27:18Z")

</div>

Take another look at the docs and the video example on Inductive University. You need to include `aggregate`, `alias`, and `path` for each tag. From the docs:

```auto
[
{
    "aggregate": "Average",
    "alias": "tank_temp",
    "path": "[default]Tank/03/Temperature"
},
{
    "aggregate": "Average",
    "alias": "setpoint",
    "path": "[default]Tank/03/Setpoint"
}
]

```

Also, you appear to have extra quotes on your `path` value

---

<div class="post-metadata">

**Author:** ![Gillian\_Carter](https://avatars.discourse-cdn.com/v4/letter/g/8edcca/32.png) [@Gillian\_Carter](https://forum.inductiveautomation.com/u/Gillian_Carter)\
**Post date:** [March 5, 2024, 3:36pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673/9 "2024-03-05T15:36:46Z")

</div>

I assumed that if I wasn't aggregating or using an alias I wouldn't need to include them. I cannot find what to put if I don't want aggregation

---

<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:** [March 5, 2024, 3:41pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-history-binding-in-perspective/28673/10 "2024-03-05T15:41:19Z")

</div>

You have to put something. Look into the docs on the system.tag.queryTagHistory function to choose an appropriate aggregate; you can choose one that doesn't interpolate, for instance.
