# Vision Power Table columns

**URL:** <https://forum.inductiveautomation.com/t/vision-power-table-columns/81571>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [November 6, 2023, 8:25pm UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571 "2023-11-06T20:25:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![casian](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@casian](https://forum.inductiveautomation.com/u/casian)\
**Post date:** [November 6, 2023, 8:25pm UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/1 "2023-11-06T20:25:06Z")

</div>

Hi,

Could anybody please help with the easiest way to re-order the columns in a power table in the desired order, from left to right?  
And I mean at startup and not by re-ordering them manually.

Thanks!

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [November 6, 2023, 8:48pm UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/2 "2023-11-06T20:48:42Z")

</div>

In designer, you should be able to hit preview and then drag the columns in the order you want.  
When you are done stop the preview and uncheck the Columns Re-Orderable option. Note though... any changes and I think that the order resets.

Another option is to use the columnRearrange expression: [columnRearrange - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/columnRearrange) to programmatically set the columns in order from the originating dataset.

---

<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:** [November 6, 2023, 8:59pm UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/3 "2023-11-06T20:59:29Z")

</div>

> [@casian](#):
>
> the easiest way to re-order the columns in a power table in the desired order, from left to right?

The easiest way, hands down, is to make your query return them in the desired order.

---

<div class="post-metadata">

**Author:** ![casian](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@casian](https://forum.inductiveautomation.com/u/casian)\
**Post date:** [November 6, 2023, 9:53pm UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/4 "2023-11-06T21:53:59Z")

</div>

Would you mind giving me an example of the query?  
Tx!

---

<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:** [November 6, 2023, 9:58pm UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/5 "2023-11-06T21:58:52Z")

</div>

```auto
SELECT columnA, columnB, columnC
FROM someTable
WHERE someCondition
ORDER BY anotherColumn

```

The order in the SELECT section is the order you get in the dataset. Which becomes the default order in a Vision table.

If you have an asterisk wildcard in your query, get rid of it. Use explicit column names, or you are at the mercy of your database administrators.

---

<div class="post-metadata">

**Author:** ![casian](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@casian](https://forum.inductiveautomation.com/u/casian)\
**Post date:** [November 6, 2023, 10:17pm UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/6 "2023-11-06T22:17:31Z")

</div>

much appreciated  
worked

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 17, 2024, 12:33am UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/7 "2024-12-17T00:33:00Z")

</div>

I have a SQL query that returns in the desired order and the `data` prop shows this correct order on the power table, but if I use table customer to hide columns the order changes, shown incorrectly on `viewDataset` prop. Any idea what I'm overlooking?

---

<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:** [December 17, 2024, 12:49am UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/8 "2024-12-17T00:49:40Z")

</div>

Hmm. Never seen that. Version? Sample dataset?

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 17, 2024, 1:01am UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/9 "2024-12-17T01:01:55Z")

</div>

I don't have a sample, but sounds like this is abnormal so I'll create a ticket and have IA take a look tomorrow. Thanks for the reply Phil.

Edit, v8.1.44

---

<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:** [December 17, 2024, 1:09am UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/10 "2024-12-17T01:09:49Z")

</div>

I'll admit to rarely using the view dataset, so who knows how long its been like this. (I tend to filter outside the table with my toolkit functions.)

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 17, 2024, 4:13pm UTC](https://forum.inductiveautomation.com/t/vision-power-table-columns/81571/11 "2024-12-17T16:13:36Z")

</div>

IA couldn't find anything wrong and I decided to delete the power table and start over, it works, so I guess a gremlin found its way inside my project.
