You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing training@inductiveautomation.com.
Version:
LESSON LIST
-
2:47Property Binding
-
2:15Property Binding – Bidirectional
-
2:19Tag Binding
-
2:17Tag Binding – Drag and Drop
-
2:19Tag Binding – Bidirectional
-
1:40Tag and Component Overlays
-
3:20Indirect Tag Binding
-
2:17Tag Historian Binding
-
3:21Expression Binding
-
1:24Expression Binding – Concat Strings
-
1:01Expression Binding – Celsius to Fahrenheit
-
2:01Expression Binding – Format Date
-
2:46Expression Binding – Date Manipulations
-
1:23Expression Binding – Bit Functions
-
2:06Expression Binding – Switch
-
1:43Expression Binding – Checking Conditions
-
2:40DB Browse Binding
-
2:05DB Browse Binding – Dynamic Filters
-
1:16SQL Query Binding
-
2:26SQL Query Binding – Polling
-
1:47SQL Query Binding – Dynamic Filters
-
1:55SQL Query Binding – Scalar Query and Fallback
-
1:47SQL Query Binding – Scalar Query and Update
-
2:24Cell Update Binding
-
2:07Function Binding
-
4:22Component Styles
Take Topic Challenge
LESSON
DB Browse Binding
Description
The DB Browse binding is technically equivalent to the SQL Query binding, except that it helps write the queries for you. Using the database browser, you can pick the table that you want to pull content from. If you have a fixed range of data to choose, simply select it in the table, and watch the query get generated.
Video recorded using: Ignition 7.7
Transcript
(open in window)[00:00] The DB Browse Binding is technically equivalent to the SQL Query Binding in that you can bring back data from a database. Though a difference is, it helps write queries for you. Using the database browser, you can pick the table that you want to pull information from and you'll see the query that gets generated. So, I can take the label here, for example, and I can bind in a text property, the label, to the DB Browse Binding type. This allows us to see all the databases that we have attached to Ignition and I can go and actually inspect all the databases here. So, in data I can see all the tables that exist. So, for example, if I want to pull information from the customer table, I can select that, and I can see a sample of all the data over here in the right hand side, to give me an idea of what that table looks like. So, let's say, for example, that I want to pull this value right here, Mary, the first name of the first row. You can see that Ignition basically created a query for us. At the bottom, the generated query is select first name from customer where customer ID equals one. So, I go ahead and press okay. I'll see Mary come back on the label here. I can do the same thing on a table. If I got into a table, I can mine the data property to DB Browse, again go into any table I want to go to, go back to the customers table here, and I can select, you know, one or more values. I could select multiple values here that I want to bring back. It's still bringing back all the information for one particular row. I can't select multiple rows, right now, and that is because over here, you see there's a key column. Customer underscore ID equals, so what we want to do is expand the table, and you'll see that there's a little key to the right hand side of the customer ID. That basically is a way to filter on that particular column. I can click on that column and I can then press the key with the X symbol on it to remove that as a key column, and now, you can see there's no key columns. So, essentially, now I can bring back multiple records and multiple columns of data. So, let's say I want to bring back all the customers, the first name, the last name, and email address. I'm simply can select all the records, here. You see they're query generated as select first name, last name, email from customer. I can then press okay. I can see back all the data come into my table, here. In the binding, we also do allow you to do ordering. So, I can basically select, let's say, the first name, and there is a button over here on the right hand side to specify if you want to sort ascending or potentially descending. I'm going to go ahead and say let's sort that in ascending order, and you see that the query that got generated down bottom says select first name from customer, order by first name, ascending. So, maybe I'll want to select the first name, last name, and email again, but we're going to order it in that way. So, I'm going to press okay. Now, you can see the data coming back in my table. So, it's very easy to use DB browse feature to basically go and pick and choose which information you want to bring back from our table.