# Handling pump state in Perspective

**URL:** <https://forum.inductiveautomation.com/t/handling-pump-state-in-perspective/105937>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 6, 2025, 7:08pm UTC](https://forum.inductiveautomation.com/t/handling-pump-state-in-perspective/105937 "2025-05-06T19:08:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anirban-Debnath](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/anirban-debnath/32/75675_2.png) [@Anirban-Debnath](https://forum.inductiveautomation.com/u/Anirban-Debnath)\
**Post date:** [May 6, 2025, 7:08pm UTC](https://forum.inductiveautomation.com/t/handling-pump-state-in-perspective/105937/1 "2025-05-06T19:08:50Z")

</div>

In a perspective design, I have a pump where I am writing a script in pump "onClick" event. I expect the script will change the state of the pump to "running" in both UI and the tag property. When I run the project in browser, it shows "Error\_Configuration".

 ![1_Screenshot 2025-05-07 002627](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/0/d093ddc7393ffe9d9f8a8b24c017d45bbf5dfc0a.jpeg)

 ![2_Screenshot 2025-05-07 002727](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/e/9e16d3cba6f2fc0325ccc0743ade7edbc258b861.jpeg)

In 1\_Screenshot file it shows the configuration and in 2\_Screenshot shows the error. Any idea what is the issue here.

Note that there is no tag associated with the pump that change the state, I am expecting that on every click on the pump, it changes the state to running (property of the pump) and then when the tank goes to 100% (which comes from integer tag used for counter to reach 100%) the pump stopped.

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [May 6, 2025, 7:32pm UTC](https://forum.inductiveautomation.com/t/handling-pump-state-in-perspective/105937/2 "2025-05-06T19:32:33Z")

</div>

Hi @Anirban-Debnath,

Your issue is that you cannot bind a property with him self.

I would rather use a custom property that you set when clicking on the pump object and reset then tank value is above 100%

Then you link that custom value to your pump state

regards

---

<div class="post-metadata">

**Author:** ![Anirban-Debnath](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/anirban-debnath/32/75675_2.png) [@Anirban-Debnath](https://forum.inductiveautomation.com/u/Anirban-Debnath)\
**Post date:** [May 6, 2025, 7:48pm UTC](https://forum.inductiveautomation.com/t/handling-pump-state-in-perspective/105937/3 "2025-05-06T19:48:17Z")

</div>

Thanks Arnaud

Can you share an example on how to do this.

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [May 7, 2025, 5:22am UTC](https://forum.inductiveautomation.com/t/handling-pump-state-in-perspective/105937/4 "2025-05-07T05:22:50Z")

</div>

[PumpState\_2025-05-07\_0719.zip](https://forum.inductiveautomation.com/uploads/short-url/vSK86fnYVxB2TVjAR2t9nycIPMS.zip) (8.1 KB)  
Hi @Anirban-Debnath,  
here and export of my test view.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/0/30fe54bce1fe3cddad7dea54270d674b97f3cf45.png)  
Under the custom properties of the view you have the tankLevel and the pumpState.  
Those are linked to the pump object and tank object. on each you have also a onchange script you can check it by right-click on the property and edit on change script.  
there is an on click script on the pump to set the running status.

Regards

---

<div class="post-metadata">

**Author:** ![Anirban-Debnath](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/anirban-debnath/32/75675_2.png) [@Anirban-Debnath](https://forum.inductiveautomation.com/u/Anirban-Debnath)\
**Post date:** [May 7, 2025, 11:21am UTC](https://forum.inductiveautomation.com/t/handling-pump-state-in-perspective/105937/5 "2025-05-07T11:21:38Z")

</div>

Thank you for sharing the example. It worked. 🙂
