# How to update text of a button based off the value of a Custom ID from a root query

**URL:** <https://forum.inductiveautomation.com/t/how-to-update-text-of-a-button-based-off-the-value-of-a-custom-id-from-a-root-query/73260>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 4, 2023, 1:47pm UTC](https://forum.inductiveautomation.com/t/how-to-update-text-of-a-button-based-off-the-value-of-a-custom-id-from-a-root-query/73260 "2023-05-04T13:47:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Javontez\_Robinson](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@Javontez\_Robinson](https://forum.inductiveautomation.com/u/Javontez_Robinson)\
**Post date:** [May 4, 2023, 1:47pm UTC](https://forum.inductiveautomation.com/t/how-to-update-text-of-a-button-based-off-the-value-of-a-custom-id-from-a-root-query/73260/1 "2023-05-04T13:47:16Z")

</div>

I am attempting to update the value of a button based of the value of a custom ID from a form that I have in ignition, I have a query in the root of my ignition project that brings in the data that I need, but I am unsure how to do this correctly, any suggestions?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 4, 2023, 2:39pm UTC](https://forum.inductiveautomation.com/t/how-to-update-text-of-a-button-based-off-the-value-of-a-custom-id-from-a-root-query/73260/2 "2023-05-04T14:39:14Z")

</div>

Is this Vision or Perspective?

---

<div class="post-metadata">

**Author:** ![Javontez\_Robinson](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@Javontez\_Robinson](https://forum.inductiveautomation.com/u/Javontez_Robinson)\
**Post date:** [May 4, 2023, 2:49pm UTC](https://forum.inductiveautomation.com/t/how-to-update-text-of-a-button-based-off-the-value-of-a-custom-id-from-a-root-query/73260/3 "2023-05-04T14:49:48Z")

</div>

Perspective

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 4, 2023, 3:04pm UTC](https://forum.inductiveautomation.com/t/how-to-update-text-of-a-button-based-off-the-value-of-a-custom-id-from-a-root-query/73260/4 "2023-05-04T15:04:29Z")

</div>

> [@Javontez\_Robinson](#):
>
> I am attempting to update the value of a button ...

Buttons don't have a `value` property. Do you mean something else such as the button's `props.text`?

---

<div class="post-metadata">

**Author:** ![Javontez\_Robinson](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@Javontez\_Robinson](https://forum.inductiveautomation.com/u/Javontez_Robinson)\
**Post date:** [May 4, 2023, 3:18pm UTC](https://forum.inductiveautomation.com/t/how-to-update-text-of-a-button-based-off-the-value-of-a-custom-id-from-a-root-query/73260/5 "2023-05-04T15:18:44Z")

</div>

correct prop.text

 ![ignition](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/d/fd7b3f1bf60e7fce2d5acc9a277538498ddee93e.png)

The red arrow from picture 1 is what I am using to determine what value from my root table query I will use find to get the correct data to fill into picture 2(yellow arrow) text area of the button

 ![ignition2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/5/656bfb40d877cf6e6ab76471387d78d312638ff5.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 4, 2023, 3:29pm UTC](https://forum.inductiveautomation.com/t/how-to-update-text-of-a-button-based-off-the-value-of-a-custom-id-from-a-root-query/73260/6 "2023-05-04T15:29:11Z")

</div>

Assuming that your ID value is on the parent container then you just create a property binding to that custom property.

 ![button.text binding](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/f/3f6cba309e1ec5f5a1f0b2f28f936440db3418dc.png)

1. Create a binding on your button `props.text`.
2. Select Property binding.
3. Point it to wherever the value is stored.
4. The result.

---

<div class="post-metadata">

**Author:** ![Javontez\_Robinson](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@Javontez\_Robinson](https://forum.inductiveautomation.com/u/Javontez_Robinson)\
**Post date:** [May 4, 2023, 4:31pm UTC](https://forum.inductiveautomation.com/t/how-to-update-text-of-a-button-based-off-the-value-of-a-custom-id-from-a-root-query/73260/7 "2023-05-04T16:31:28Z")

</div>

This works for me

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

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 4, 2023, 5:09pm UTC](https://forum.inductiveautomation.com/t/how-to-update-text-of-a-button-based-off-the-value-of-a-custom-id-from-a-root-query/73260/8 "2023-05-04T17:09:11Z")

</div>

Good, but why don't you write directly to the button's `props.text` instead of to the view's `props.custom.id` and then the additional binding on `props.text`?

Don't forget to mark this thread as solved.
