Show SQL result on a table (quite simple)

Hello everyone!
I am a newbie at Igniton, and I am trying to advance from 0 to my first step.

I created a Named Query which is retrieving some rows and columns, and what I would like to achive is quite simple. Show all the values in a Vision table.
But as far as I can check, I can not replace column headers, or change the height of the row, meanwhile I can set the column width and the value sorting.

How can do this, and even more, where should I start to make this first step? I mean, I have not idea of Ignition.

If you mean, change the name, this is typically done with aliases in the SQL query. It can be done with scripting as well, but not so easily if it's a bound query. If you are referring to styling, this can be done with scripting in a power table's configureHeaderStyle extension function.

You want to add a query binding to the data property of the table.

The documentation, Vision - Power Table - Ignition User Manual 8.1 - Ignition Documentation, as well as are great places to get from 0 to step 1 with Ignition

The easy way was only the obvious thing... Changing it in the SQL query, thank you :sweat_smile:

I will choose the power table, I thought the "Table" was enough, but Power Table seems to be a better option.

The power table is really just a wrapped table, but All those extra bells and whistles really do come in handy. I prefer the power table, even for simple things.

Changing the column names in a power table is very simple, use the table customizer,

Um, no. They are independent subclasses of AbstractVisionScrollPane. The implementations seem to be utterly unrelated. The regular table uses a JTable, the other uses JIDE components.

In case you haven't found it already, the row height for a power table can be manually changed in the Vision property editor, but the Auto Row Height property will need to be unchecked before any row height adjustments will be accepted.

Yes, I did it this afternoon, but I can´t understand why a "Table" can not handle this kind of behavior.

This kind of subclasses, what means in terms of usability and which are the implications in the back?
I mean, I am just starting at Ignition, and I even don´t know what JIDE or the "AbstractVisionScrollPane" are related with.

Thank you

He's correct. I should have chose my words more carefully. The base table is a PMITable, and the powertable is a VisionAdvancedTable.

In programming hierarchy, these are referred to as classes, and anything that can be invoked via these classes are referred to as methods. Looking at the documentation in both instances, these are both implementations of the Class AbstractVisionScrollPane.

Knowing this class information is useful for scripting because Java documentation is thorough and easy to read. If there is ever any question about a component class, or where to look for documentation, the type() statement can usually provide the necessary direction.

At the heart of virtually everything in Vision is the programming language Java. and regardless of what the component is, it seems like you can simply stick a J in front of the word, and find the documentation for Java's version online. For example, a table in Java is a Jtable and checkbox in Java is a JCheckbox. Consequently, at the heart of a regular table is a JTable. The JTable is quite versatile and scriptable, but inductive automation develops and extends the class to make common things already in place or easier to implement.


So, as all that Java info is putting a J in front, that is why you are Justinedwards? :joy:

I have no previous experience with Java, but with other traditional Scada systems.
Thank you for all this information, I will stay in the forum to learn and still learning.

Thank you everyone!

1 Like