# Script Console - Value from Client

**URL:** <https://forum.inductiveautomation.com/t/script-console-value-from-client/39119>\
**Category:** Ignition\
**Created:** [September 28, 2020, 3:55pm UTC](https://forum.inductiveautomation.com/t/script-console-value-from-client/39119 "2020-09-28T15:55:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![steven.cox](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.cox/32/18589_2.png) [@steven.cox](https://forum.inductiveautomation.com/u/steven.cox)\
**Post date:** [September 28, 2020, 3:55pm UTC](https://forum.inductiveautomation.com/t/script-console-value-from-client/39119/1 "2020-09-28T15:55:44Z")

</div>

Hi all,

Very new to Ignition and scripting,…and everything else…:).

I have a dropdown and a label on a Vision window. The label is bound to the dropdown selectedStringValue.

Int he client, when I make a selection from the dropdown, the label changes to match the selection…no poblem.

HOWEVER, in designer, neither the dropdown nor the label changes to match the client. So I am questioning what the value actually is? I put a script in the Script Console to print the value and it only prints the value that is in the designer.

So now I need to understand how any “action” i take with the selected value will actually get the correct value?

What am I missing with this relationship?

Thanks, Steven

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 28, 2020, 4:15pm UTC](https://forum.inductiveautomation.com/t/script-console-value-from-client/39119/2 "2020-09-28T16:15:44Z")

</div>

Multiple designers or clients can each have a running instance(copy) of the window. With the binding you have described changes on one instance will not effect the value of components on another instance.

---

<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:** [September 28, 2020, 4:19pm UTC](https://forum.inductiveautomation.com/t/script-console-value-from-client/39119/3 "2020-09-28T16:19:52Z")

</div>

To elaborate a bit on @lrose’s answer: Component properties are purely local to the client or designer (or Perspective session/page/view). To share values among multiple users, you must _bind_ to a shareable location. In Ignition, that would be a gateway tag. A memory tag if purely internal, or an OPC tag if connected to a PLC (or whatever). You will often want a _bidirectional_ binding.

---

<div class="post-metadata">

**Author:** ![steven.cox](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.cox/32/18589_2.png) [@steven.cox](https://forum.inductiveautomation.com/u/steven.cox)\
**Post date:** [September 28, 2020, 6:22pm UTC](https://forum.inductiveautomation.com/t/script-console-value-from-client/39119/4 "2020-09-28T18:22:28Z")

</div>

@lrose that makes since and appears to be what I am seeing.

@pturmel So that brings me to another question. I can bind my label to a memory tag, make it bidirectional and it works fine. However, doing so breaks the binding to the dropdown.

I guess my question is actually 2 questions…

1. can you bind a component value to a tag without using bidirectional…i.e. component value changes, tag changes?

2. Can you create more than one biding to a component value? i.e. component value changes, binding 1 changes and binding 2 changes?

I did create a memory tag and bound it to the dropdown and I can see it change as I change the selection in a client.

Thanks so much for the explanations.

Steven

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 28, 2020, 6:54pm UTC](https://forum.inductiveautomation.com/t/script-console-value-from-client/39119/5 "2020-09-28T18:54:49Z")

</div>

> [@steven.cox](#):
>
> can you bind a component value to a tag without using bidirectional…i.e. component value changes, tag changes?

Yes. Non-Bidirectional bindings are read only. So if you need the user to be able to _write_ a value back to a tag, then the binding needs to be _bidirectional_.

> [@steven.cox](#):
>
> Can you create more than one biding to a component value? i.e. component value changes, binding 1 changes and binding 2 changes?

If by this you mean could you have two labels driven off of a single dropdown, then yes that is possible.

---

<div class="post-metadata">

**Author:** ![steven.cox](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.cox/32/18589_2.png) [@steven.cox](https://forum.inductiveautomation.com/u/steven.cox)\
**Post date:** [September 28, 2020, 7:09pm UTC](https://forum.inductiveautomation.com/t/script-console-value-from-client/39119/6 "2020-09-28T19:09:08Z")

</div>

@lrose thanks! Looks like I am going to have to learn scripting a lot better!🙂

Thanks for the help,

Steven

---

<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:** [September 29, 2020, 12:21am UTC](https://forum.inductiveautomation.com/t/script-console-value-from-client/39119/7 "2020-09-29T00:21:47Z")

</div>

> [@steven.cox](#):
>
> I can bind my label to a memory tag, make it bidirectional and it works fine. However, doing so breaks the binding to the dropdown.

In this case, you'd want to bind both to the tag. The label binding would be unidirectional, presumably. Note that bindings are attached to a target property of a component. Each component property can only have one binding. But the other end, the sources (tags, other properties, queries, etc), can be used many times all over the place.

---

<div class="post-metadata">

**Author:** ![steven.cox](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.cox/32/18589_2.png) [@steven.cox](https://forum.inductiveautomation.com/u/steven.cox)\
**Post date:** [September 29, 2020, 1:32pm UTC](https://forum.inductiveautomation.com/t/script-console-value-from-client/39119/8 "2020-09-29T13:32:58Z")

</div>

@pturmel thanks for the explanation.

Steven
