# Perspective Table column edit problem

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-column-edit-problem/41597>\
**Category:** Ignition Early Access\
**Tags:** perspective, ignition80\
**Created:** [December 17, 2020, 5:46am UTC](https://forum.inductiveautomation.com/t/perspective-table-column-edit-problem/41597 "2020-12-17T05:46:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [December 17, 2020, 5:46am UTC](https://forum.inductiveautomation.com/t/perspective-table-column-edit-problem/41597/1 "2020-12-17T05:46:14Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8b53aadd4c6f02cec6fb325ac34a698dbab376e6.png)  
I am a new comer to perspective, I am used to the vision power table, so I want to use Perspective table have the some function as vision power table.  
One of the issue is , I create a named query that have 27 columns, I want to make some editable and some Hide in the background, current my solution is I add columns in the props when the columns is less than 10 , it will be very quick , but if after the column is greater than 10, I have to wait about 30s, I don’t know this is only my issue?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/e/8e0e3eb8d479db9c4dd51a606c36073b81aef096.png)  
I also have to manually type in the column name in the field one by one, have some smart solution?  
If I want to edit only 1 column, I will have to list all the 27 column and type in all their column name?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 17, 2020, 7:00am UTC](https://forum.inductiveautomation.com/t/perspective-table-column-edit-problem/41597/2 "2020-12-17T07:00:21Z")

</div>

> [@yifeiliu08](#):
>
> but if after the column is greater than 10, I have to wait about 30s, I don’t know this is only my issue?

The "delay" depends on what version you're using. We recently improved the schema handling (I believe it was in 8.1.1, but time is behaving a little weird right now, so maybe it was 8.1.2), which reduced the "delay" encountered when adding complicated objects to the Property Editor.

> [@yifeiliu08](#):
>
> I also have to manually type in the column name in the field one by one, have some smart solution?

You could bind the `Table.props.columns` array to an abstract of your dataset, then loop over the abstract and supply a new entry for `columns` where the `field` property is set to the header of the column.

> [@yifeiliu08](#):
>
> If I want to edit only 1 column, I will have to list all the 27 column and type in all their column name?

By default, the Table will display every column of the dataset and implicitly map each column of the dataset to a new column of the Table. As soon as you start providing your own column configurations we no longer automatically map everything, so really you should just provide a new object in `columns` for every column you DO want displayed. If you want to "hide" a column, do NOT provide an object for that column of the dataset.

Using the default data of the Table component as an example, if I add two column objects to the `columns` array, and I set one `field` property to "city" and one to "population", you can see that the "country" column is no longer displayed.

---

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [December 17, 2020, 7:48am UTC](https://forum.inductiveautomation.com/t/perspective-table-column-edit-problem/41597/3 "2020-12-17T07:48:48Z")

</div>

Thanks for cmallonee’s suggestion  
for the slow issue , my current version is 8.1.0rc1, I will download a newest version in my demo machine for test

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/f/2fec782b8d017fd039c34dd15cb78fe60f8da34a.png)  
Can you give me a screenshots or code by means of the demo table of the perspective? I just transfer from vision logic to perspective.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/6/f6d82d42d982fbccdcf6c69d169d3344a0ed6b86.png)  
For this point, If I have 3 columns, I want to hide the ID as the following picture I add it in the column and make it not able to visible , is this ok or that will reduce the software speed? Last time I have try a 27 columns table and hide 4 columns, then I found the software is very very slow.  
Why I still want to hide them, because this ID is no use for the operator but I need to use it for sql program, in vision system I make it hide  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/9/7992af6008bd81908e87dc4ad67e8398b0e596b6.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 17, 2020, 11:47am UTC](https://forum.inductiveautomation.com/t/perspective-table-column-edit-problem/41597/4 "2020-12-17T11:47:40Z")

</div>

> [@yifeiliu08](#):
>
> Can you give me a screenshots or code by means of the demo table of the perspective?

 ![Screen Shot 2020-12-17 at 3.38.58AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/da03234ba95b03b8bd17f65307654972f23b1d84.png)

There's a lot going on in this screenshot, but here are the important points:

- My `columns` object is bound to the same dataset (Tag Binding) as the `data` of the table.
- I'm looping over the headers of that dataset and building a new array which has only the column names that I want to include. In this example I'm creating a simple object with only the `field` key, but if you want to specify other properties from the column config you're able to. If you do not supply properties, the column will use the default values which make sense given the data type of the values in the column
- In the Property Editor, you can see that I only have the two column configs in place and I only see the those two columns of my dataset displayed in the Table.

> [@yifeiliu08](#):
>
> For this point, If I have 3 columns, I want to hide the ID as the following picture I add it in the column and make it not able to visible , is this ok or that will reduce the software speed?

This is perfectly valid and should not slow anything down, other than taking the time to create that column if you're not going to use it. The primary reason to supply a column config but not display it is because if the row renders a subview, then the the subview gets all of the column values for the row; in instances where the subview might need data but you don't want that data displayed in the row, we needed to allow for storing that data in the row without displaying it.

---

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [December 18, 2020, 2:06am UTC](https://forum.inductiveautomation.com/t/perspective-table-column-edit-problem/41597/5 "2020-12-18T02:06:31Z")

</div>

Thanks ,this is just what I want to know.
