LESSON

Table Row Versioning

Description

Learn how to create different row versions for your tables to use. Add an alternate version that will be used every other row, or use the Version Key property to select a row version based on an expression.

Video recorded using: Ignition 8.1

Transcript

(open in window)

[00:00] When using tables and reports, you can conditionally display rows of data in different formats. This is known as table row versioning. As you can see, I already have this report set up with a table component to represent my equipment downtime data. My table is making use of a few kinds of rows, which are the header details and summary. When we select any of these rows, let's choose our details row from our project browser for example, we'll see their version appear on the right hand side of the table. Currently, all of my rows are set to the default version, which is standard. If we click on the dropdown menu where we see standard, we are presented with all of the available row versions. Let's choose the add alternate option for our details row. The way alternate works is that the table will alternate between the standard row version and the alternate row version. This can be used to do things like a alternating the background color of our rows. So for example, we can change the background color by going to our property inspector and then enabling the fill property.

[01:08] Let's then change our fill color to orange. When we go to the preview tab, we'll see our detailed rows alternate between the standard white color and our alternate orange color. Of course, we can apply more complex conditions to our rows, so let's take a look at that next. We'll head back to the design tab and we'll select our details row again. This time by double clicking where we see details. One important thing to keep in mind is whenever we navigate away from our design tab and then later come back to it, the rows version will start off with the standard row version selected. So if we wanted to make any changes to our alternate row, we do have to go back to the dropdown menu and select it. I actually want to remove the alternate version to keep things simple. However, you are able to configure multiple row versions. Since we already have alternate selected, we can simply go into the dropdown menu again and select the remove option this time. You are able to remove any row version except for the standard row version.

[02:04] For the next example, let's take a look at my table's data. We'll head to the data tab. You can see I have five production lines with their downtime represented in minutes. For our table let's set this up so that any rows that have a downtime of over 40 minutes are displayed in red. This can help users better identify which production lines are having more trouble. We'll go back to the design tab and select our details row. Let's choose a new row version by opening the dropdown. In this use case, we're going to need to create a custom condition, so we'll select add custom. When creating a custom row version, we need to give it a label. Let's call this one high. After clicking on okay, you'll see that the high row version is currently selected. I'm going to make the property inspector floating just so it's a bit easier to see. To build our condition, we are going to make use of the version key property. The version key property is what's going to allow us to conditionally select which row version to use. So for example, I'm going to click into the property and we want to look at our downtime minutes, and if they're greater than 40.

[03:07] If they're greater than 40, we want to use the high row versioning or our new one we just created. Otherwise, let's use the standard one and I'll hit enter to go ahead and commit that. With our condition in place let's update the fill color like we did before, however, we'll choose a red color this time. Now, if we come to the preview tab, we see it worked. So all the lines with the weekly downtime, less than 40, are using the standard row versioning and everything greater, all the lines with the weekly downtime, greater than 40 are using the high row versioning.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.