# Named Query - Specific cell

**URL:** <https://forum.inductiveautomation.com/t/named-query-specific-cell/100498>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [January 6, 2025, 8:27pm UTC](https://forum.inductiveautomation.com/t/named-query-specific-cell/100498 "2025-01-06T20:27:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Warren\_McDonald](https://avatars.discourse-cdn.com/v4/letter/w/91b2a8/32.png) [@Warren\_McDonald](https://forum.inductiveautomation.com/u/Warren_McDonald)\
**Post date:** [January 6, 2025, 8:27pm UTC](https://forum.inductiveautomation.com/t/named-query-specific-cell/100498/1 "2025-01-06T20:27:22Z")

</div>

I have a few named queries setup on my project so I'm semi familiar with queries, but this particular problem is related to a text box that I want to populate with SQL data, depending on the selected dropdown "StepName".

Table: processsteps  
Columns: StepNumber, StepName, Editor, Comments

I want to populate a textbox with Editor and Comment data when the particular StepName is selected. I have the dropdown data tied to an internal tag, and I'm trying to use that to point towards the correct row in the SQL table:

SELECT Editor   
FROM processsteps  
WHERE StepName = {[default]Internal/ActiveStepRecipe.value}

It does not like this, and I'm not sure if it's a formatting problem or linking the tag is where it's going wrong. Any thoughts?

---

<div class="post-metadata">

**Author:** ![danieltalbot](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/danieltalbot/32/11201_2.png) [@danieltalbot](https://forum.inductiveautomation.com/u/danieltalbot)\
**Post date:** [January 6, 2025, 8:31pm UTC](https://forum.inductiveautomation.com/t/named-query-specific-cell/100498/2 "2025-01-06T20:31:30Z")

</div>

Are you using a scalar named query for the text box?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [January 6, 2025, 8:32pm UTC](https://forum.inductiveautomation.com/t/named-query-specific-cell/100498/3 "2025-01-06T20:32:16Z")

</div>

Since you are using a named query, you parameterize the step name and then use your tag as the parameter in the binding.

Your named query should look like this

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/a/ba0cd3691eae963dad86e89d741bac5b18d31580.png)

---

<div class="post-metadata">

**Author:** ![Warren\_McDonald](https://avatars.discourse-cdn.com/v4/letter/w/91b2a8/32.png) [@Warren\_McDonald](https://forum.inductiveautomation.com/u/Warren_McDonald)\
**Post date:** [January 6, 2025, 9:10pm UTC](https://forum.inductiveautomation.com/t/named-query-specific-cell/100498/4 "2025-01-06T21:10:11Z")

</div>

Thank you! That took care of that.

If I have a button I want to use to delete a specific row based on this same "StepName" selection, would I set it up the same? Scalar and have step\_name as a parameter?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [January 6, 2025, 9:12pm UTC](https://forum.inductiveautomation.com/t/named-query-specific-cell/100498/5 "2025-01-06T21:12:14Z")

</div>

> [@Warren\_McDonald](#):
>
> Scalar and have step\_name as a parameter?

No, scalar queries return a single value instead of a dataset. For deletes and updates you want to change the query type to `update`
