# Event.Column not available?

**URL:** <https://forum.inductiveautomation.com/t/event-column-not-available/90976>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 27, 2024, 8:01pm UTC](https://forum.inductiveautomation.com/t/event-column-not-available/90976 "2024-05-27T20:01:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [May 27, 2024, 8:01pm UTC](https://forum.inductiveautomation.com/t/event-column-not-available/90976/1 "2024-05-27T20:01:05Z")

</div>

While troubleshooting why `object has no attribute 'column'`, I discovered this:

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

This is the `onRowClick` event. But, `event.column` shows up in the "IntelliSense" window in the `onEditCellCommit` event.

Why is this?  
(The mystery was why two tables, with the same data source, and same event configurations, one table returned the error about the column attribute, but the other table worked perfectly fine. The operation being selecting checkboxes, either one or more. Somehow, I got the second table to function like the first, but I do not know why/how, yet. The driving force is to understand the `event` object better, as I was reading this post:

> [@Can a sql update be done on a table in perspective](https://forum.inductiveautomation.com/t/can-a-sql-update-be-done-on-a-table-in-perspective/59667/7):
>
> You created a custom method on a Perspective Table called onCellEdited. Unless you’ve placed code in the proper Perspective events to do so, your custom method will never be called. Did you place any code in the onCellEditCommit event?

and Phil's comments here:

> [@Perspective Table: How to display value in dropdown?](https://forum.inductiveautomation.com/t/perspective-table-how-to-display-value-in-dropdown/42528/2):
>
> From my limited experience, your dropdown should be in a view that is used in the table. The view should take two parameters: The dataset or JSON object containing the options. The value property of the option to be selected. You would then bind the dropdown properties to the view parameters.

And of course the docs on the subject.

> **[Perspective - Table Scripting | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-table/perspective-table-scripting)**
>
> This page details the various scripting, component, and extension functions available for Perspective's Table component.

I really wanted to understand Greg's problem, besides attitude, and become much more acquainted with event scripting. As I dive deeper into working with tables, and attempting to recreate some function of other programs I am used to... It's a lot like tying knots. You learn some really good basic ones, but then you need something more secure, somewhat adjustable, easier to release, etc. So the rope or fishing line wraps and moves in more complex ways.

Update:  
So the table I actually want to work with is throwing that same attribute error. Everything looks the same between the two.

EXCEPT!  
The `onRowClick` for the working table is not enabled. 🤦‍♂️ And disabling that event for the currently not working table, allows it to work. But the question remains, why is the `event.column` availabe in the "IntelliSense" but throws an error?

---

<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:** [May 27, 2024, 8:43pm UTC](https://forum.inductiveautomation.com/t/event-column-not-available/90976/2 "2024-05-27T20:43:38Z")

</div>

Event objects are generic. They have the properties appropriate to the kind of event they come from. (You can use reflection to look closer at them, if you like.) That a row-click event supplies just row information make sense to me. Cell events naturally supply more location information.

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [May 27, 2024, 8:59pm UTC](https://forum.inductiveautomation.com/t/event-column-not-available/90976/3 "2024-05-27T20:59:56Z")

</div>

Ok, so what is "reflection"?

And the row versus cell click makes perfect sense! Which, answers the question I just posited in the edited comments.

---

<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:** [May 27, 2024, 9:03pm UTC](https://forum.inductiveautomation.com/t/event-column-not-available/90976/4 "2024-05-27T21:03:27Z")

</div>

Reflection is runtime examination of live data types. Sometimes called **introspection**. See my [inspect.py](https://www.automation-pros.com/ignition/inspect.py) script for something that has been helping me look "under the hood" since the FactoryPMI days.

In python, the `type()` function and `dir()` function are the basis for figuring out what you have. Java has a set of more precise tools for looking up method signatures and field attributes, and bypassing protected/private markings.

See my Integration Toolkit's reflection section for **verbose** reflection of objects and types.

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [May 27, 2024, 9:31pm UTC](https://forum.inductiveautomation.com/t/event-column-not-available/90976/5 "2024-05-27T21:31:32Z")

</div>

A printing of the `system.reflect.pyObject(event, False)` inside the `onRowClick` didn't give much useful info, I think. Attributes for various `types`, most of which are hidden by another type.

As for the `coerced` method, what is considered a class in an event, and how would I pass it?

---

<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:** [May 27, 2024, 9:33pm UTC](https://forum.inductiveautomation.com/t/event-column-not-available/90976/6 "2024-05-27T21:33:40Z")

</div>

Events are true java objects, use `system.reflect.object()`.

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [May 27, 2024, 9:44pm UTC](https://forum.inductiveautomation.com/t/event-column-not-available/90976/7 "2024-05-27T21:44:19Z")

</div>

I think I might be wading too far into the deep here, lol. And the weeds are getting thick...

Besides, why are we working on a holiday anyway?

Well, what can I do with this info?

```python
class c.i.i.c.g.JsonObject
  extends class c.i.i.c.g.JsonElement implements Serializable
# Public Fields of c.i.i.c.g.JsonObject
# Public Methods of c.i.i.c.g.JsonObject
                                           public void add(String arg0, c.i.i.c.g.JsonElement arg1)
                                           public void addProperty(String arg0, String arg1)
                                           public void addProperty(String arg0, Boolean arg1)
                                           public void addProperty(String arg0, Character arg1)
                                           public void addProperty(String arg0, Number arg1)
             public Map<String, c.i.i.c.g.JsonElement> asMap()
         public bridge synthetic c.i.i.c.g.JsonElement deepCopy()
                           public c.i.i.c.g.JsonObject deepCopy()
  public Set<Map.Entry<String, c.i.i.c.g.JsonElement>> entrySet()
                                        public boolean equals(Object arg0)
                          public c.i.i.c.g.JsonElement get(String arg0)
                                     public BigDecimal getAsBigDecimal() inherited from c.i.i.c.g.JsonElement
                                     public BigInteger getAsBigInteger() inherited from c.i.i.c.g.JsonElement
                                        public boolean getAsBoolean() inherited from c.i.i.c.g.JsonElement
                                           public byte getAsByte() inherited from c.i.i.c.g.JsonElement
                                           public char getAsCharacter() inherited from c.i.i.c.g.JsonElement
                                         public double getAsDouble() inherited from c.i.i.c.g.JsonElement
                                          public float getAsFloat() inherited from c.i.i.c.g.JsonElement
                                            public int getAsInt() inherited from c.i.i.c.g.JsonElement
                            public c.i.i.c.g.JsonArray getAsJsonArray() inherited from c.i.i.c.g.JsonElement
                            public c.i.i.c.g.JsonArray getAsJsonArray(String arg0)
                             public c.i.i.c.g.JsonNull getAsJsonNull() inherited from c.i.i.c.g.JsonElement
                           public c.i.i.c.g.JsonObject getAsJsonObject() inherited from c.i.i.c.g.JsonElement
                           public c.i.i.c.g.JsonObject getAsJsonObject(String arg0)
                        public c.i.i.c.g.JsonPrimitive getAsJsonPrimitive() inherited from c.i.i.c.g.JsonElement
                        public c.i.i.c.g.JsonPrimitive getAsJsonPrimitive(String arg0)
                                           public long getAsLong() inherited from c.i.i.c.g.JsonElement
                                         public Number getAsNumber() inherited from c.i.i.c.g.JsonElement
                                          public short getAsShort() inherited from c.i.i.c.g.JsonElement
                                         public String getAsString() inherited from c.i.i.c.g.JsonElement
                          public final native Class<?> getClass() inherited from Object
                                        public boolean has(String arg0)
                                            public int hashCode()
                                        public boolean isEmpty()
                                        public boolean isJsonArray() inherited from c.i.i.c.g.JsonElement
                                        public boolean isJsonNull() inherited from c.i.i.c.g.JsonElement
                                        public boolean isJsonObject() inherited from c.i.i.c.g.JsonElement
                                        public boolean isJsonPrimitive() inherited from c.i.i.c.g.JsonElement
                                    public Set<String> keySet()
                              public final native void notify() inherited from Object
                              public final native void notifyAll() inherited from Object
                          public c.i.i.c.g.JsonElement remove(String arg0)
                                            public int size()
                                         public String toString() inherited from c.i.i.c.g.JsonElement
                                     public final void wait() inherited from Object
                              public final native void wait(long arg0) inherited from Object
                                     public final void wait(long arg0, int arg1) inherited from Object

```

---

<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:** [May 27, 2024, 10:22pm UTC](https://forum.inductiveautomation.com/t/event-column-not-available/90976/8 "2024-05-27T22:22:15Z")

</div>

> [@mdemaris](#):
>
> weeds are getting thick

You'll be towering over them soon enough.

> [@mdemaris](#):
>
> working on a holiday

I do non-billable stuff on evenings and weekends and holidays when I have the urge to code. (And lately I've been waking up having dreamed code for my upcoming historian option.) I monitor the forum when I'm coding. Short breaks help when my brain is on fire.

> [@mdemaris](#):
>
> what can I do with this info?

It's a summary of what you'd get from javadocs, chained together for all of the parent classes of the object, plus private details if you asked for verbose output. From, this, with [some knowledge of how jython wraps java](https://forum.inductiveautomation.com/search?q=%40pturmel%20netbeans%20order%3Alatest), lets you predict what should be shown in intellisense, if not suppressed.

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [May 27, 2024, 10:31pm UTC](https://forum.inductiveautomation.com/t/event-column-not-available/90976/9 "2024-05-27T22:31:20Z")

</div>

Yeah, today is a good day for my brain. It's mostly quiet at work and I feel like I am making decent progress, except for stumbling through these weeds, 🙂 .  
But I will save hacking them down for another day, when I realize that this project may require me to do so.
