# Perspective binding executing two times consecutively

**URL:** <https://forum.inductiveautomation.com/t/perspective-binding-executing-two-times-consecutively/36197>\
**Category:** Ignition\
**Created:** [June 30, 2020, 3:24pm UTC](https://forum.inductiveautomation.com/t/perspective-binding-executing-two-times-consecutively/36197 "2020-06-30T15:24:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maja](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@maja](https://forum.inductiveautomation.com/u/maja)\
**Post date:** [June 30, 2020, 3:24pm UTC](https://forum.inductiveautomation.com/t/perspective-binding-executing-two-times-consecutively/36197/1 "2020-06-30T15:24:34Z")

</div>

I have a view and a custom variable which value I am updating by binding, expression with a tag value, and then script. What I notice. My tag value is updating one every 5 minutes (dataset tag) and binding on custom variable executing every time two times.  
Is it a bug? Or I am doing something wrong?

Thanks!

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 30, 2020, 4:02pm UTC](https://forum.inductiveautomation.com/t/perspective-binding-executing-two-times-consecutively/36197/2 "2020-06-30T16:02:20Z")

</div>

Can you post a screenshot of the binding dialog? Also, what are you seeing to lead you to believe it’s evaluating the binding twice? Actually, are you claiming it’s evaluating twice each time the tag updates, or that it is only evaluating every other time the the tag changes? Is there one driving value for this property’s value, or is it dependent on changes to a binding AS WELL AS the value of a tag?

---

<div class="post-metadata">

**Author:** ![maja](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@maja](https://forum.inductiveautomation.com/u/maja)\
**Post date:** [June 30, 2020, 8:35pm UTC](https://forum.inductiveautomation.com/t/perspective-binding-executing-two-times-consecutively/36197/3 "2020-06-30T20:35:20Z")

</div>

Thi is not the first time that I have this problem and this is not only case. I am fighting with this problem already few day. Custom variable is, for now, static, tag that I am using on event value change log message (that I am using to be sure that value isn’t changed two or more times).It’s evaluating twice each time the tag updates. In scripts below I don’t change value of the tag in expression.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/1/0144d7fe888648523f3c0660f93133bafe9a856f.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 30, 2020, 9:24pm UTC](https://forum.inductiveautomation.com/t/perspective-binding-executing-two-times-consecutively/36197/4 "2020-06-30T21:24:00Z")

</div>

Your expression has two different values which drive it, so it will evaluate whenever either of them changes. I can’t see any of the script, but try these options:

1. Verify that nothing in the script writes directly or by extension to either the tag or the custom property which are used in the expression.
2. Instead of only logging “enter” as part of the script transform, try logging the values of the tag and the custom property. You’ll probably find that the value of one of them is changing. If the values aren’t changing, perhaps the timestamp of the tag is different? That _might_ result in the expression evaluating because the Tag is no longer technically equal to what it was before.
3. I’m not familiar with the `view` expression you are using. Is that a third-party expression? If so, you might want to contact the provider as they might be able to explain what you’re seeing.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 1, 2020, 12:32am UTC](https://forum.inductiveautomation.com/t/perspective-binding-executing-two-times-consecutively/36197/5 "2020-07-01T00:32:05Z")

</div>

> [@cmallonee](#):
>
> I’m not familiar with the `view` expression you are using.

That's mine. From Simulation Aids.

Note that writing the same string to `this.custom.condition` is still a change as far as the expression language is concerned. Don't do that if condition is unchanged.

---

<div class="post-metadata">

**Author:** ![maja](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@maja](https://forum.inductiveautomation.com/u/maja)\
**Post date:** [July 1, 2020, 10:27pm UTC](https://forum.inductiveautomation.com/t/perspective-binding-executing-two-times-consecutively/36197/6 "2020-07-01T22:27:42Z")

</div>

Condition will be changed. At the moment it’s static value.
