# Table with dropdown combobox

**URL:** <https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178>\
**Category:** Ignition\
**Created:** [March 20, 2012, 6:50pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178 "2012-03-20T18:50:05Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinmarchand](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kevinmarchand](https://forum.inductiveautomation.com/u/kevinmarchand)\
**Post date:** [March 20, 2012, 6:50pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/1 "2012-03-20T18:50:05Z")

</div>

Hi,

```
I have a table that show downtime and one of the field is an equipmentID so I would like to have a dropdown that would show all the value in the euipement table but insert only the ID in my downtime table.

```

Is this possible and how. thanks

---

<div class="post-metadata">

**Author:** ![Greg.Buehler](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Greg.Buehler](https://forum.inductiveautomation.com/u/Greg.Buehler)\
**Post date:** [March 20, 2012, 7:45pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/2 "2012-03-20T19:45:41Z")

</div>

So you have a table containing downtime information indexed by EquipmentId, and you want to filter the contents of this table using a combobox populated with equipment?

Combobox Databinding:

```auto
SELECT EquipmentId, EquipmentName FROM tbl_Downtime;
```

Table Databinding:

```auto
SELECT * FROM tbl_Downtime WHERE EquipmentId={SomePath.ToThe.Combobox.selectedValue};
```

---

<div class="post-metadata">

**Author:** ![kevinmarchand](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kevinmarchand](https://forum.inductiveautomation.com/u/kevinmarchand)\
**Post date:** [March 21, 2012, 12:10pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/3 "2012-03-21T12:10:48Z")

</div>

Hi,

I wasnt clear enough. What I want its a combobox cell inside the Table like you see in most of the web base table.  
So when you click on the field its a combobox field link to a sql select command not a text field.

```
I hope this will clarify my question. 

```

Thanks

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 21, 2012, 4:39pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/4 "2012-03-21T16:39:18Z")

</div>

Can’t do it with a table. You’d have to roll your own “faux” table.

I had posted something sort of similar… gimme a moment

EDIT: [Found it!](http://inductiveautomation.com/forum/viewtopic.php?p=23932#p23932)

---

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [March 22, 2012, 4:58pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/5 "2012-03-22T16:58:42Z")

</div>

[quote=“[kevinmarchand@bc.com](mailto:kevinmarchand@bc.com)”]Hi,

```
I have a table that show downtime and one of the field is an equipmentID so I would like to have a dropdown that would show all the value in the euipement table but insert only the ID in my downtime table.

```

Is this possible and how. thanks[/quote]

I think I know what you are asking for, an editable field on a table that has a dropdown list for selections?

Right now that can be hard coded using the translate Map in the table customizer for the particular column you are after. This generated an html string that is stored in the table’s column attribute dataset.  
Would be nice if this translate map could be bound to something.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/07d4c96c3f249112daf9b55f22fc7707c933b60e.jpg)  
  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/14570534e6292a5ab893cc90bf68c44e692ad8b7.jpg)

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [March 22, 2012, 5:30pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/6 "2012-03-22T17:30:52Z")

</div>

You can make the translate map dynamic by binding the “Column Attributes Data” dataset to a “Cell Update” binding. With that you can dynamically change the translateMap column for the appropriate row. The map is just an xml like string that you can generate on a dynamic property.

I know it is a little hacky but it works. 🙂

---

<div class="post-metadata">

**Author:** ![kevinmarchand](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kevinmarchand](https://forum.inductiveautomation.com/u/kevinmarchand)\
**Post date:** [March 23, 2012, 10:14am UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/7 "2012-03-23T10:14:50Z")

</div>

Hi Travis,

Since the bit hacky complexy thing would you be generous enough to post a attachement with an example of this strategy.

thanks

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [March 23, 2012, 4:17pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/8 "2012-03-23T16:17:03Z")

</div>

Ok, I have made a small example. I made the example in Ignition 7.4 rc2 (b841) so you can only import the attachment in that version or newer.

The attachment is a backup made from the Ignition designer. So you can open your designer and right click on Windows in the Project Browser to select Import… From there select the .proj file attachment and it will import the window.

The window just has a table. The table’s data can be bound to whatever you want. The table has two special custom properties (dynamic properties):

translateData  
translateStr

The translateData is all of the data you want to show up in the mapping. It needs to be bound to a SQL query to get the mapping from the database. Once the translateData property changes there is a propertyChange script (event handler) on the table that loops through the data creating a translateStr like this:

1Display

Finally the column attributes data property is bound to a cell update binding where the appropriate column’s map comes from the translateStr.

Like I said, a bit hacky but it works.

[Table Translate Map.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/38313000506650a9aac4c05ad767468aebf96255.proj) (32.7 KB)

---

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [March 23, 2012, 5:37pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/9 "2012-03-23T17:37:31Z")

</div>

Thanks Travis.

Used it and it works!

Had to ensure query for data to translateData was not Polling OFF so that the event trigger would work.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [March 23, 2012, 7:57pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/10 "2012-03-23T19:57:08Z")

</div>

Right, good catch. The query on the translateData property should be polling off.

---

<div class="post-metadata">

**Author:** ![PaoloPK](https://avatars.discourse-cdn.com/v4/letter/p/ba8739/32.png) [@PaoloPK](https://forum.inductiveautomation.com/u/PaoloPK)\
**Post date:** [March 12, 2018, 1:44pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/11 "2018-03-12T13:44:24Z")

</div>

Why can not I download the proj file?

---

<div class="post-metadata">

**Author:** ![kaushik.shah](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kaushik.shah](https://forum.inductiveautomation.com/u/kaushik.shah)\
**Post date:** [December 9, 2019, 8:19pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/12 "2019-12-09T20:19:56Z")

</div>

@Travis.Cox, I was trying to use the same function but can’t download the project because of either private thread or something else ! Can you post it again on a separate thread please ?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [December 11, 2019, 11:17pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/13 "2019-12-11T23:17:29Z")

</div>

I have no idea why that link is broken and I wasn’t able to find the existing project export. So, I re-created it in Ignition 8.0.7:

[TranslateTableExample\_2019-12-11\_1515.zip](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/85e5cfffa72cb9f333f0f7c384a118451f58ca67.zip) (11.5 KB)

Of course, you need 8.0.7 but the same principle applies to older versions. Just open it in the latest vesrion to see how it was put together. Let me know if there are questions.

---

<div class="post-metadata">

**Author:** ![kavya\_shree](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@kavya\_shree](https://forum.inductiveautomation.com/u/kavya_shree)\
**Post date:** [January 24, 2023, 9:33am UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/16 "2023-01-24T09:33:16Z")

</div>

Hi,

Any videos available on this?  
One more requirement I want is,  
1.How to put checkbox in this dropdown(multiple selection)  
2.how to put link in table.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [January 24, 2023, 6:03pm UTC](https://forum.inductiveautomation.com/t/table-with-dropdown-combobox/4178/17 "2023-01-24T18:03:53Z")

</div>

Vision has 2 different table components: Table and Power Table. The example above is using the Table component. The component provides a way to change how the columns appear. See this link for more details:

[https://docs.inductiveautomation.com/display/DOC81/Vision+-+Table+Customizer](https://docs.inductiveautomation.com/display/DOC81/Vision+-+Table+Customizer)

The example above simply adds in a Translation List.

The Power Table offers more flexibility to change how the table looks, especially with the editors. See this page for more details:

[https://docs.inductiveautomation.com/display/DOC81/Vision+-+Power+Table](https://docs.inductiveautomation.com/display/DOC81/Vision+-+Power+Table)

See the configureCell and configureEditor scripting extension functions.
