# Finding a query in projects

**URL:** <https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335>\
**Category:** Ignition\
**Tags:** ignition81, database, perspective\
**Created:** [October 10, 2025, 2:09am UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335 "2025-10-10T02:09:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sweetz](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Sweetz](https://forum.inductiveautomation.com/u/Sweetz)\
**Post date:** [October 10, 2025, 2:09am UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/1 "2025-10-10T02:09:25Z")

</div>

Hello,

I have about 14 perspective projects (Identical GUI with different station no.s). I have the following query (Trace log screenshot) running every few seconds from different projects, but I am not able to find it even with project search through Designer Launcher.

The yellow highlighted shows the project-name but the view under is from a different project altogether (same discrepancy for other instances of this query log) and it adds ‘@C’ at the end too as shown. Is there a better way to track it down? Thanks

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/a/2a7b7106ebce36cf59ef09b9bf76e20304007d50.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:** [October 10, 2025, 10:36am UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/2 "2025-10-10T10:36:55Z")

</div>

> I am not able to find it even with project search through Designer Launcher.

I don't think you can search from Launcher. Did you mean Designer itself?

> I have about 14 perspective projects (Identical GUI with different station no.s).

Why? Why not one project with parameters?

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [October 10, 2025, 11:57am UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/3 "2025-10-10T11:57:38Z")

</div>

In the search tool did you make sure to check all the boxes to search all views, events etc? It does not do it by default.

Also I agree with @Transistor something about this setup smells.

---

<div class="post-metadata">

**Author:** ![Sweetz](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Sweetz](https://forum.inductiveautomation.com/u/Sweetz)\
**Post date:** [October 10, 2025, 1:19pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/4 "2025-10-10T13:19:21Z")

</div>

I inherited this whole thing recently. No plans to change as it will go away after a few months

I mean I searched through ‘Designer’ after opening the project. Everything was checked when I did the ‘Ctrl+F‘.

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [October 10, 2025, 1:35pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/5 "2025-10-10T13:35:21Z")

</div>

You can open the projects folder (`Ignition\data\projects`) in the Ignition installation directory with an application like Notepad++ or VSCode and search the folder for that string. You should find it in a query.sql file if it is a Named Query, a \*.py file if it is built directly into a project library, or in a view.json file if it’s in a component action or a binding.

Update 1: \*low chance it’s in an external python library which would be not located in the projects folder but in the path: `\Ignition\user-lib\pylib` so you might need to search there too.

---

<div class="post-metadata">

**Author:** ![Sweetz](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Sweetz](https://forum.inductiveautomation.com/u/Sweetz)\
**Post date:** [October 10, 2025, 2:34pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/6 "2025-10-10T14:34:59Z")

</div>

Still can’t find it. So weird

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [October 10, 2025, 2:38pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/7 "2025-10-10T14:38:39Z")

</div>

> [@Transistor](#):
>
> because I always put the WHERE on the start of a new line.

just search `from parts` or `where pallet`. Who knows why it’s not popping up if you paste the full string, extra space or line break could be to blame.

---

<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:** [October 10, 2025, 2:41pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/8 "2025-10-10T14:41:42Z")

</div>

Good thinking. I'd search for "where pallet" first, because I always put the WHERE on the start of a new line.

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [October 10, 2025, 2:43pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/9 "2025-10-10T14:43:04Z")

</div>

> [@Transistor](#):
>
> on the start of a new line.

That was a test if you practice good SQL query writing, and you passed 😉

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [October 10, 2025, 2:43pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/10 "2025-10-10T14:43:44Z")

</div>

Not exactly the same issue unless all your projects inherit from one parent project, but it reminded me of a feature request I made:

> **[Search all projects that inherit from parent project | Ignition Features and...](https://ideas.inductiveautomation.com/ignition-features-and-ideas/p/search-all-projects-that-inherit-from-parent-project)**
>
> It is useful that the search includes results from the parent of a project, but it would be even more useful if it could go the other way, and include results

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [October 10, 2025, 2:53pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/11 "2025-10-10T14:53:35Z")

</div>

I would even just search parts or pallet, no idea what kind of sql injection someone is doing `“SELECT * FROM {} WHERE {} = ?”`

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [October 10, 2025, 2:55pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/12 "2025-10-10T14:55:24Z")

</div>

I have good faith they are using prepared statements w/system.db.runPrepQuery 🙂

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [October 10, 2025, 2:55pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/13 "2025-10-10T14:55:57Z")

</div>

Ah but we already know they inhereited this project and it’s architecture is questionable at best. Assume the worst hope for the best lol.

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [October 10, 2025, 3:03pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/14 "2025-10-10T15:03:26Z")

</div>

> [@Sweetz](#):
>
> The yellow highlighted shows the project-name but the view under is from a different project altogether

That suggests that the view is in a project that the project-name inherits from...? Does Sta\_32\_22\_Interface have a parent project?

---

<div class="post-metadata">

**Author:** ![Sweetz](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Sweetz](https://forum.inductiveautomation.com/u/Sweetz)\
**Post date:** [October 10, 2025, 3:12pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/15 "2025-10-10T15:12:53Z")

</div>

They don’t have a parent project. They had a base project and got imported and then saved after required changes/updates were done per station.

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [October 10, 2025, 3:19pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/16 "2025-10-10T15:19:51Z")

</div>

Yikes. I wish you luck with that! Lucky for you they are planned to no longer be used.

---

<div class="post-metadata">

**Author:** ![Sweetz](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Sweetz](https://forum.inductiveautomation.com/u/Sweetz)\
**Post date:** [October 10, 2025, 4:43pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/17 "2025-10-10T16:43:48Z")

</div>

I shutdown all perspective sessions and started to open one by one and finally was able to figure which projects are running the query.

I open one of the projects and can’t find the query again lol…

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [October 10, 2025, 5:48pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/18 "2025-10-10T17:48:47Z")

</div>

Gateway scripts? Project Scripts? Tag change scripts? SFCs? Transaction Groups?

I would run a tag report tool and select Query as the tag type to rule out tags.

---

<div class="post-metadata">

**Author:** ![Sweetz](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Sweetz](https://forum.inductiveautomation.com/u/Sweetz)\
**Post date:** [October 13, 2025, 4:40pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/19 "2025-10-13T16:40:41Z")

</div>

Finally found the query object. So, the actual named query does not have TOP 1 in the query. I disabled the query on the object to make sure it’s not showing up in logs, verified it and re-enabled it.

Not sure why it’s being changed to ‘SELECT TOP 1 count(serial)’ from ‘Select count(serial)’ when the query is being executed.

Please throw some light if this behavior was observed before. Thanks.

---

<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:** [October 13, 2025, 5:28pm UTC](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335/20 "2025-10-13T17:28:31Z")

</div>

Is the query returning a scalar1 value? This might cause the addition of the `TOP 1` by Ignition's SQL engine.

1 The term "scalar" comes from [linear algebra](http://en.wikipedia.org/wiki/Scalar_%28mathematics%29), where it is used to differentiate a single number from a vector or matrix. The meaning in computing is similar. It distinguishes a single value like an integer or float from a data structure like an array. _Source: [StackExchange](https://softwareengineering.stackexchange.com/a/238045)_.

[Next page](https://forum.inductiveautomation.com/t/finding-a-query-in-projects/111335.md?page=2)
