# Binding text of one window to another window

**URL:** <https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346>\
**Category:** Ignition\
**Created:** [April 29, 2013, 8:43pm UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346 "2013-04-29T20:43:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwillenbring](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@mwillenbring](https://forum.inductiveautomation.com/u/mwillenbring)\
**Post date:** [April 29, 2013, 8:43pm UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/1 "2013-04-29T20:43:29Z")

</div>

Hi,

Been playing with ignition for a bit and going to training soon, but have a question. I would like to make an “active” sidebar in my project in which when you click the text of a label in my north docked navigation pane, it changes a value or text in a label or navigation tree in my west side docked window. I am finding it hard to transfer data between windows/root containers.

Any help would be appreciated! Thank You!

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [April 29, 2013, 9:44pm UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/2 "2013-04-29T21:44:01Z")

</div>

You could use a client tag to achieve this. Create a Client Tag that is a string data type. Place a mouseReleased event on the label with

```
         system.tag.write("[Client] tagname", "string value")

```

in the script editor. Now bind the other label in your docked window, or whichever component your using, to the client tag.

---

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [October 25, 2021, 1:32pm UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/3 "2021-10-25T13:32:37Z")

</div>

I m also facing the same issue. plz help

how to bind text prop from one window into another window?(Perspective)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 25, 2021, 1:45pm UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/4 "2021-10-25T13:45:37Z")

</div>

in perspective you can use a custom session property.  
or message handlers.

dont use tags for this in perspective as there are no “client tags”

---

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [October 25, 2021, 1:55pm UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/5 "2021-10-25T13:55:02Z")

</div>

Thanks for your reply!

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/5/85508bea8a104855bdbb3bd271d84dceb7681dfc.png)  
in custom session property, it is only showing session props and I want to bind the text value from window so how it is possible. Please help.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 25, 2021, 2:12pm UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/6 "2021-10-25T14:12:05Z")

</div>

you will have to bind the window prop to the session prop not the other way around. As the session doesnt know anything about any windows

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 25, 2021, 6:55pm UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/7 "2021-10-25T18:55:29Z")

</div>

The answer really is that you can’t bind component properties on one Window/View to another Window/View as they don’t know each other exists, especially not in development time. You need to use something that is always present and known, which is where client tags (Vision) and session custom props or message handlers (Perspective) come in. You bind your components to these (or for message handlers, you don’t bind but you implement them) to pass values around.

---

<div class="post-metadata">

**Author:** ![awaege1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awaege1/32/28922_2.png) [@awaege1](https://forum.inductiveautomation.com/u/awaege1)\
**Post date:** [October 25, 2021, 9:30pm UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/8 "2021-10-25T21:30:41Z")

</div>

I would avoid using tags wherever possible with perspective with things like this since tags are gateway scoped and will update for input from any perspective client. This makes an application with multiple clients an actual nightmare that you won’t notice in dev since you are the only one making changes.

I agree with nminchin above that session properties and messages are the way to go. I tend to almost exclusively use message handlers for this thought since I like to reserve session properties for “higher-level” project scoped properties and not just individual view properties.

One caution with message handlers though is that they can sometimes be difficult to trace, especially with Ignitions limited debugging tools. I usually like to wrap all of my message handler scripts with the following code so that debugging is easier, especially in larger projects:

```auto
import sys

try:
	#message handler code here
except:
	system.perspective.print('Handler Name')
	system.perspective.print(str(sys.exc_info()))

```

---

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [October 26, 2021, 8:07am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/9 "2021-10-26T08:07:05Z")

</div>

Thanks for the replies.  
I want to pass the text value from one view to another popup view event scripting.  
below is my view1 text component

and I want to pass the text value to below view 2 button event so that it saves aftr clicking on save button and data gets saved.

plz help me on this

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 26, 2021, 8:19am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/10 "2021-10-26T08:19:00Z")

</div>

yeah you should not use session props for this.

You can add props to a popup.  
using view params

In the popup view you can add a param here:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/55bf20c0669125ad271017ad0340011cc8ecf898.png)  
Then you can link it here:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/6/6691d537253ea9ac5e293717e73b90b59c61c5a9.png)  
Or if you use script somehting like this:  
`system.perspective.openPopup("myPopupId", "folder/custompopup", params={"aParam":self.props.text})`

---

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [October 26, 2021, 8:57am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/11 "2021-10-26T08:57:55Z")

</div>

thank u so much for your help. I will try this out

---

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [October 26, 2021, 10:14am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/12 "2021-10-26T10:14:45Z")

</div>

as you said i have added params via scripting on main View’s save button, plz check below img

now on this below popup view button, parameters are not showing so how can i use those values and pass it to the database?

there is no params under popup view’s button event to store/pass into database

I am new to this plz help me in solving this

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 26, 2021, 10:38am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/13 "2021-10-26T10:38:22Z")

</div>

> [@victordcq](#):
>
> ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/55bf20c0669125ad271017ad0340011cc8ecf898.png)

If you place them here inside the popupview they should show up in the "explorer" thingy in your popup. You probably will have to close and reopen the config though so it can update the "explorer"

---

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [October 26, 2021, 10:50am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/14 "2021-10-26T10:50:53Z")

</div>

Thanks again for your reply!  
I want to pass the values from scripting to popup params as I have converted some component values and called required other popup msgs to display and validations too so after going through all these things data needs to get saved after clicking on yes,proceed button (which popups after clicking on main view’s save button). so how can I pass values from save button event scripting to yes,proceed (Popup view’s)button event script so that i can pass these values to database by calling Stored procedure on yes,proceed (Popup view’s)button  
Hope you understand my concern.  
need help plz  
If any additional explanation required, plz let me know

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 26, 2021, 11:00am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/15 "2021-10-26T11:00:21Z")

</div>

I understand, what you want and i think my answers have covered everything. What else is not working?  
Your popup script seems to add in the params correctly. (as far i can see on the small screenshot)  
If you have added the same names (LotId, MatlName ...) to the view params of your popup:

> [@victordcq](#):
>
> > [@victordcq](#):
> >
> > ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/55bf20c0669125ad271017ad0340011cc8ecf898.png)

they should show up in the browser properties  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/a/0ab86d120812bb1c89bf7d52df528d9d34ac4264.png)

so you can use them just like you did in this script

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

---

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [October 26, 2021, 11:15am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/16 "2021-10-26T11:15:22Z")

</div>

Thank u so much for the detailed explanation. I have already added the params to popup view and tried to print to check the passed value of LotId as you can check image in the above popup view event script i have added params from browser props only but while sending here i have deleted becoz in console it’s printed as “value” which is default one and not passed value of lotid so thought i am going in a wrong way.  
I will try once again and confirm  
Thanks a lot

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 26, 2021, 11:23am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/17 "2021-10-26T11:23:35Z")

</div>

if you still have problems show me the full script of where you open the popup^^

---

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [October 26, 2021, 11:53am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/18 "2021-10-26T11:53:58Z")

</div>

Thank for your help !  
i am getting below error  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac550578b2007a690fa8fe85439fdb6d0ef86e26.png)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 26, 2021, 11:55am UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/19 "2021-10-26T11:55:31Z")

</div>

plz copy the script and not a screen shot and use preformated text:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/d/4d782be5ade2a5f41f35c615749fd02cc9f044cd.png)  
both the script that opens the popup and the one that writes to the db

---

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [October 26, 2021, 12:03pm UTC](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346/20 "2021-10-26T12:03:16Z")

</div>

this is the code of Popup view button script and I am not facing any error on save button, here how to convert those values to int while passing it to SP, should i share save button(main view)script (it’s too long )

[Next page](https://forum.inductiveautomation.com/t/binding-text-of-one-window-to-another-window/6346.md?page=2)
