# What does "this" parameter do in a named query?

**URL:** <https://forum.inductiveautomation.com/t/what-does-this-parameter-do-in-a-named-query/73028>\
**Category:** Ignition\
**Created:** [April 28, 2023, 3:34pm UTC](https://forum.inductiveautomation.com/t/what-does-this-parameter-do-in-a-named-query/73028 "2023-04-28T15:34:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [April 28, 2023, 3:34pm UTC](https://forum.inductiveautomation.com/t/what-does-this-parameter-do-in-a-named-query/73028/1 "2023-04-28T15:34:43Z")

</div>

So, I see in the 8.1.27 release notes that there's now a convenient button to add the `{this}` field into named SQL update query parameters. But what does `{this}` evaluate to? I have no idea what it does and "this" is a pretty awful search keyword so I'm having trouble figuring it out online.

---

<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:** [April 28, 2023, 11:52pm UTC](https://forum.inductiveautomation.com/t/what-does-this-parameter-do-in-a-named-query/73028/2 "2023-04-28T23:52:45Z")

</div>

From my prior to ignition coding experiences, I intuitively interpret the word `this` in the same way as `self`, but in that context `this` would be an object, and it simply doesn't make sense to use an object in a query, so...

good question!

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [April 29, 2023, 12:46am UTC](https://forum.inductiveautomation.com/t/what-does-this-parameter-do-in-a-named-query/73028/3 "2023-04-29T00:46:49Z")

</div>

The "Scalar Query Update" section on [{this} 🙃 page](https://docs.inductiveautomation.com/display/DOC81/SQL+Query+Bindings+in+Vision) may help shed some light (section quoted below too). I'm assuming it is intended for a similar use case with the Named Query, but maybe not.

> **Scalar Query Update**  
> You can bind a non dataset type property to a SQL query to allow a singular value to be returned from the database with a scalar query. Now instead of returning multiple rows and columns, the query returns a single value from the first row of the first column. These types of SQL Query bindings can also be used to update the database on input components like a Text Field. Essentially, we mimic the bidirectionality of Tag and property bindings by adding in an update query to run whenever a value gets entered into the property with the binding. In our update query, we use the special parameter **{this}** to denote the new value from the bound property. If **{this}** is a string, it needs single quotes around it.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 29, 2023, 12:50am UTC](https://forum.inductiveautomation.com/t/what-does-this-parameter-do-in-a-named-query/73028/4 "2023-04-29T00:50:08Z")

</div>

That's exactly what it is. It only applies to the context of a Vision named query binding.

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [May 1, 2023, 6:37pm UTC](https://forum.inductiveautomation.com/t/what-does-this-parameter-do-in-a-named-query/73028/5 "2023-05-01T18:37:59Z")

</div>

I rarely wander through the Vision side of the manual, so I had no idea there are bi-directional named queries on that side of the fence. Any plans to add that sort of functionality to Perspective? I know you can get the same effect with an onChange event script and two named queries (one in each direction), so I understand if it's not planned, but I was impressed with the simplicity for the developer on the Vision binding.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 1, 2023, 7:32pm UTC](https://forum.inductiveautomation.com/t/what-does-this-parameter-do-in-a-named-query/73028/6 "2023-05-01T19:32:23Z")

</div>

I'm not aware of any plans. From what I remember, there are some big caveats with the Vision approach that make it hard to extend, but I'll never say never 🙂

Modules can add new binding types, too, if I can try to nerd snipe Phil a second time today 😆

---

<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:** [May 1, 2023, 8:09pm UTC](https://forum.inductiveautomation.com/t/what-does-this-parameter-do-in-a-named-query/73028/7 "2023-05-01T20:09:54Z")

</div>

Hah! Busy with other nerdy things.
