# Power Table named query wait message

**URL:** <https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [February 12, 2024, 4:26pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567 "2024-02-12T16:26:02Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alfredo\_Egmo](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@Alfredo\_Egmo](https://forum.inductiveautomation.com/u/Alfredo_Egmo)\
**Post date:** [February 12, 2024, 4:26pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/1 "2024-02-12T16:26:03Z")

</div>

Hello  
I have a Named query to fill a Power table using parameters from combos on the same window. Here the question is: How can I send a "wait" message to the user while the query is running and stop the message once the Power table is filled?  
thanks

---

<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:** [February 13, 2024, 3:08pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/2 "2024-02-13T15:08:24Z")

</div>

> [@Alfredo\_Egmo](#):
>
> using parameters from combos

It's not clear how the table's data property is being populated. Is this a named query binding or is this being scripted? How long does the query typically take?

It's possible to make a "wait" label visible, run a query asynchronously, and use invoke later to hide the label at the end, but before we start down that road, I have to ask: what is it about the query that makes it take so long? Perhaps it would be better to explore ways to make the data retrieval more efficient.

---

<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:** [February 13, 2024, 3:19pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/3 "2024-02-13T15:19:13Z")

</div>

Not when using a query binding. But if you run the query in a background thread (via `system.util.invokeAsynchronous`), then you could use some visual change to signal that the UI is "busy", and remove the indicators when the query result is delivered (via `system.util.invokeLater).

See this older topic for techniques you can/should use:

> [@Update GUI via Asynchronous thread](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666):
>
> I’ve got a script I am experimenting with that can take a lot of time to execute, so I now use the system.util.invokeAsynchronous to run the script in a separate thread to keep the GUI from locking up. I am using the asynchronous thread to copy files from one place to another, and I would like to show the progress of the file copy with a progress bar. How would I go about this? I am importing a few python libraries to do this. import shutil def fileTransfer(): path = system.file.openFile() …

I like making an indeterminate progress bar visible, combined with disabling the entry fields and buttons that set up the query.

---

<div class="post-metadata">

**Author:** ![Alfredo\_Egmo](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@Alfredo\_Egmo](https://forum.inductiveautomation.com/u/Alfredo_Egmo)\
**Post date:** [February 13, 2024, 3:58pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/4 "2024-02-13T15:58:55Z")

</div>

Here an image, there is a power table with NAMED query on it, in some of these reports the user can query many days of many data which can take maybe 5-10 seconds to show the information but when they click I want something telling the user "wait"

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/d/7d22a0c5649854e3c68d74c1aa90f7f0b9737c2d.png)

---

<div class="post-metadata">

**Author:** ![Alfredo\_Egmo](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@Alfredo\_Egmo](https://forum.inductiveautomation.com/u/Alfredo_Egmo)\
**Post date:** [February 13, 2024, 4:00pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/5 "2024-02-13T16:00:04Z")

</div>

thanks I will try this

---

<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:** [February 13, 2024, 4:06pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/6 "2024-02-13T16:06:28Z")

</div>

Have you created the appropriate indexes on your Temp200 table?  
You should at least have an index for

- Datetimestamp
- Equip\_id

and even better would be a multi-column index on both as well as the other two.

---

<div class="post-metadata">

**Author:** ![Alfredo\_Egmo](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@Alfredo\_Egmo](https://forum.inductiveautomation.com/u/Alfredo_Egmo)\
**Post date:** [February 13, 2024, 4:13pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/7 "2024-02-13T16:13:52Z")

</div>

Yes the indexes and query are not an issue, is the amount of data and columns because this is utilized for the users to be exported for other purpouses, also when they don't have an indicator of "wait" they are not aware that the data changed on the screen (it happened).

---

<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:** [February 13, 2024, 6:18pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/8 "2024-02-13T18:18:48Z")

</div>

Is this to show something visually? I bind the visibility of some text like "Loading" to the `.propertiesLoading` part of a table or power table which does get triggered is True as the query is running (and perhaps during initial load up of the table itself but that's never been problematic) and off when the query finishes.

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

---

<div class="post-metadata">

**Author:** ![Alfredo\_Egmo](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@Alfredo\_Egmo](https://forum.inductiveautomation.com/u/Alfredo_Egmo)\
**Post date:** [February 13, 2024, 6:48pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/9 "2024-02-13T18:48:17Z")

</div>

Excelent, this is what I need, here the image if someone else need it.  
thank you all.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/5/253ee937778b6ec5f0afed1b8209481b93ae294a.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:** [February 13, 2024, 6:50pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/10 "2024-02-13T18:50:24Z")

</div>

> [@Alfredo\_Egmo](#):
>
> Yes the indexes and query are not an issue,

Do you mean the indexes exist or you don't think they're important? (They are!)

---

<div class="post-metadata">

**Author:** ![Alfredo\_Egmo](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@Alfredo\_Egmo](https://forum.inductiveautomation.com/u/Alfredo_Egmo)\
**Post date:** [February 13, 2024, 6:52pm UTC](https://forum.inductiveautomation.com/t/power-table-named-query-wait-message/85567/11 "2024-02-13T18:52:51Z")

</div>

They Exist and are not an issue.  
thanks
