Global TablesΒΆ
Global tables allow you to look up data based on another field or fields. Much of their configuration is similar to Asset Information or Event Types, but the way they are used is quite different.
Suppose we set up a global table with two fields: Number (a numeric), and Name (an alphanumeric), and we add values to the table like below:
Number | Name |
---|---|
1 | one |
2 | two |
3 | three |
Then, if you have an asset information form field called Number, you can look up the matching entry from the global table, and display it on the form. To do this, add an asset information form field of type Global Lookup. Edit that field and set Linked Field to the “Name” field from your global table. On the Function page, you need to set a comparison function — in this simple example you would choose “Compare A=B”, and the two parameters you’d set for that function would be the Number field from your global table and the Number field from your asset information form. This works somewhat like a JOIN in a database query: NEXUS will apply the comparison function, and that will cause it to find the global table row that matches your asset field. If the “Number” field on your asset information form has the value “2”, then NEXUS will look in your global lookup table, find the row with Number equal to “2”, look across that row to find that Name is “two”, and will show that in the global lookup field on your asset information form.
Global tables can have more than two fields — we could add a third column to our example giving the name in French. We can also use other comparison functions: there are others with names like “Compare A < B”, “Compare A <> B”, and so on. You can also create your own: if you had three different fields in your asset information form that all had to match the corresponding fields in your global lookup table, you might create a comparison function called “Compare A=B and C=D and E=F”. Your comparison function should return the whole number “1” when you want rows to match, and “0” when you want rows to not match. If there are several rows that would return a “1” (you could write a particularly simple-minded comparison function called “Always return 1”, for example), then the first row that matches will be returned.
Global tables can be useful for storing standardised data — for example, you could have global tables that store things like properties of different materials, piping schedule data, etc.
Note that Global lookup fields are distinct from Lookup List fields: lookup lists let the user choose from a drop-down; whereas Global Lookup fields are more like a Calculation, filling in a value without the user taking any action, and without the user being able to later modify that value.