# Get current values in a Table component in vision

**URL:** <https://forum.inductiveautomation.com/t/get-current-values-in-a-table-component-in-vision/96917>\
**Category:** General Discussion\
**Tags:** ignition81, vision\
**Created:** [October 7, 2024, 4:52pm UTC](https://forum.inductiveautomation.com/t/get-current-values-in-a-table-component-in-vision/96917 "2024-10-07T16:52:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharad.sharma](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sharad.sharma](https://forum.inductiveautomation.com/u/sharad.sharma)\
**Post date:** [October 7, 2024, 4:52pm UTC](https://forum.inductiveautomation.com/t/get-current-values-in-a-table-component-in-vision/96917/1 "2024-10-07T16:52:42Z")

</div>

What would be a best approach to show current values for motor data like below in a tabular format using either a Table or Power Table. I have about 4 motors in the system with a SQLLite database. I don't see any current value table in the SQLLite database.

Parameters i would like to show in the table. e.g. table is shown below.

1. Motor Staus
2. Motor Speed
3. Motor Current
4. Timestamp  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/d/4d884b50820e206fdd86d5a929686ed1b545b83f.png)

The best I could do was to get a historical values for the tags by doing SQL Query using Inner join between 2 tables.

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

```python
SELECT id, tagpath, floatvalue, t_stamp 
FROM sqlth_te
INNER JOIN sqlt_data_1_2024_10 ON sqlth_te.id = sqlt_data_1_2024_10.tagid;

```

List of tables in the database that I have. I don't see any realtime values table separately here.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/c/6cd11682116f3c9b79277ad731b424d58270bccb.png)

Thanks  
Sharad

---

<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:** [October 7, 2024, 5:04pm UTC](https://forum.inductiveautomation.com/t/get-current-values-in-a-table-component-in-vision/96917/2 "2024-10-07T17:04:36Z")

</div>

Use the built-in tag history query function.  
[system.tag.queryTagHistory | Ignition User Manual (inductiveautomation.com)](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-tag/system-tag-queryTagHistory)

---

<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:** [October 9, 2024, 9:49am UTC](https://forum.inductiveautomation.com/t/get-current-values-in-a-table-component-in-vision/96917/3 "2024-10-09T09:49:07Z")

</div>

I would probably not build this in a table component. For live values, I would likely use labels with tag bindings. If I needed table like functionality, such as adding or removing rows, I would make a generic row template, and build the table as needed with a template repeater.

---

<div class="post-metadata">

**Author:** ![sharad.sharma](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sharad.sharma](https://forum.inductiveautomation.com/u/sharad.sharma)\
**Post date:** [October 10, 2024, 8:52am UTC](https://forum.inductiveautomation.com/t/get-current-values-in-a-table-component-in-vision/96917/4 "2024-10-10T08:52:04Z")

</div>

Thank You @justinedwards.jle @dkhayes117 for your guidance.  
I was able to create tables using 3 different methods as per your inputs.

Method 1  
Using Tag History option selecting all required tags manually for all Motors.  
Date Range: Realtime, Most Recent: 1 sec  
Return format: Tall, Sample Size: Fixed, 1  
Polling mode: Absolute, Poll Rate: 1 sec  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/352f76e7b5974eb30b77a1a5b4cf93ff6bc76d5d.png)

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

Method 2  
Included a reference for the Motor number. This gives an option to select the motor through a dropdown to view the data for in a Tall view.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/c/3c2af65e152aafc5a99b1d28fae284fb1a0bc899.png)

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

Method 3  
Updated the table to a wide view to show all the parameters in a single row.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/2/5269ed1a3fa6670b6886a5a48f2746d3bf62d1f0.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/5/e539200937aa5f5a38fc5b0d77656a8b67dffd8d.png)

I have listed few advantages and disadvantages below for each method.

| | Advantages | Disadvantages |
| --- | --- | --- |
| Method 1 | Displays all the data in a single view | Data displayed is not dynamic and one has to manually add the new motor tags. |
| Method 2 | Ability to browse through the list of Motors | All the Motors data is not displayed in a single view. |
| | | The data is still not be dynamic as, one will have to add the data set for new motors in the Drop down tool now. |
| Method 3 | All the motor parameters are visible in the same row. | All the Motors data is not available to be displayed in a single view. |
| | | The data displayed will still not be dynamic as I will have to add the data set for new motors in the Drop down tool |

I am still thinking of a method, where I could create a dynamic overview and the new motors would get added automatically to the table. All motors data is visible in a single wide view without having to select the motor through dropdown.  
something like below.

| Motor Desc | Status | Current | Speed | Timestamp |
| --- | --- | --- | --- | --- |
| Motor 1 | Running | 100.5 | 50.2 | 10/10/2024 14:09 |
| Motor 2 | Running | 125.8 | 75.6 | 10/10/2024 14:09 |
| Motor 3 | Stopped | 113.6 | 38.5 | 10/10/2024 14:09 |
| Motor 4 | Running | 183.9 | 45.2 | 10/10/2024 14:09 |

Thanks  
Sharad
