# Power Table JTable Methods

**URL:** <https://forum.inductiveautomation.com/t/power-table-jtable-methods/34140>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [April 22, 2020, 10:03pm UTC](https://forum.inductiveautomation.com/t/power-table-jtable-methods/34140 "2020-04-22T22:03:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandersen](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dandersen](https://forum.inductiveautomation.com/u/dandersen)\
**Post date:** [April 22, 2020, 10:03pm UTC](https://forum.inductiveautomation.com/t/power-table-jtable-methods/34140/1 "2020-04-22T22:03:10Z")

</div>

This is more of a learning exercise for future use but lets say I wanted to use a JTable method on a Power Table. Below is the code that I thought would work but I’m missing some key concept here as to how Ignition is treating a component. This is setup on a Power Table property change script. “getGridColor()” and “getWidth()” work ok but it throws an exception at “getDropLocation()”. All 3 of these methods are part of a JTable according to JavaDocs.

```auto
if event.propertyName == "viewDataset":
	comTable = event.source
	print comTable.getWidth()
	print comTable.getGridColor()
	print comTable.getDropLocation()

```

---

<div class="post-metadata">

**Author:** ![JGJohnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jgjohnson/32/29582_2.png) [@JGJohnson](https://forum.inductiveautomation.com/u/JGJohnson)\
**Post date:** [April 22, 2020, 10:54pm UTC](https://forum.inductiveautomation.com/t/power-table-jtable-methods/34140/2 "2020-04-22T22:54:26Z")

</div>

Your table reference is getting the Power Table, not the underlying JTable. You can get the JTable using the following.

```auto
if event.propertyName == "viewDataset":
	comTable = event.source.getTable()
	print comTable.getWidth()
	print comTable.getGridColor()
	print comTable.getDropLocation()

```

---

<div class="post-metadata">

**Author:** ![dandersen](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dandersen](https://forum.inductiveautomation.com/u/dandersen)\
**Post date:** [April 23, 2020, 2:52pm UTC](https://forum.inductiveautomation.com/t/power-table-jtable-methods/34140/3 "2020-04-23T14:52:32Z")

</div>

That makes sense now. Where does one find the documentation that shows the “.getTable()” method? I am unable to locate that in the Ignition documentation.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 23, 2020, 3:14pm UTC](https://forum.inductiveautomation.com/t/power-table-jtable-methods/34140/4 "2020-04-23T15:14:38Z")

</div>

[http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.11/com/inductiveautomation/factorypmi/application/components/VisionAdvancedTable.html](http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.11/com/inductiveautomation/factorypmi/application/components/VisionAdvancedTable.html)

I've opined about this before on the forums, but the short version is that it's unreasonable to document every property of every possible object you'll be exposed to in scripting; take a look at that page; the `VisionAdvancedTable` java class behind the power table component has over a hundred methods; following the `getTable()` method to [`JideTable`](http://www.jidesoft.com/javadoc/com/jidesoft/grid/JideTable.html) has a few hundred more, and isn't even an "Ignition" component; it's from a third party library.

I'd start with the further steps I outline here; it's how I worked things out as a support rep:

> [@User object functions](http://forum.inductiveautomation.com/t/user-object-functions/28211/4):
>
> Unfortunately, at some level (and it’s easy to do, so there’s no real way to tell you exactly when it will be) you “break out” of the expected areas where we’ve documented things and end up in the base Java classes that we’re using internally. Jython automatically wraps these up so they mostly seem like Python objects, so it’s hard to tell exactly when you get there. What I generally recommend, if you’re encountering something unfamiliar and want to see what you can do with it: Start with run…

---

<div class="post-metadata">

**Author:** ![dandersen](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dandersen](https://forum.inductiveautomation.com/u/dandersen)\
**Post date:** [April 23, 2020, 6:00pm UTC](https://forum.inductiveautomation.com/t/power-table-jtable-methods/34140/5 "2020-04-23T18:00:45Z")

</div>

I think that is exactly what I was looking for. A link to the JavaDocs on the Ignition code itself. I can then see the classes of the objects and go from there.

---

<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:** [April 23, 2020, 8:06pm UTC](https://forum.inductiveautomation.com/t/power-table-jtable-methods/34140/6 "2020-04-23T20:06:09Z")

</div>

Be aware that the JavaDocs are provided for use with the SDK, which has no support promises, or even API guarantees from version to version. They don’t form a “supported” interface for jython scripting that IA will maintain for your continued use. Very handy, but you may have extra testing to do when upgrading your Ignition installs.
