VOLUME XCVII 09/09/2021
Of the many powerful and easy-to-use features available in Ninox, the ability to display a popup selection window by linking two tables is among the most used and most valuable. Sometimes, however, it’s not necessary to display all of the records in the lookup table. This week’s Tech Tip focuses on how to limit – or Constrain – the contents of your linked table popup selection lists. Take, for example, two tables – States and Cities – in a single database. The States table contains all of the states and provinces within a country while the Cities table contains all of the cities in that same country. The Cities table is related to the States table such that each city is linked with one state.
Once a user has selected a state, as demonstrated above, Ninox should then popup a selection window of cities. But instead of showing all the records in the Cities table, the popup should only display cities in the State that has been previously selected. To do this, we need to Constrain the selection of City records. This is very simple to do in Ninox
In the image above, we see the parameters screen for the Cities field (a linked field referencing the Cities table) with the red arrow highlighting the Constraints formula. When we click on the Constraints formula field, it will take us to the formula editor presented below.
This formula editor looks a little different than what we’re used to in that it show two tables – a. and b. – with the respective table names in parentheses. This a/b reference identifies the current table (a.) and the table containing the records to be presented in the popup select window (b.). In order to ensure that the only cities that appear in the City popup are those in the selected state we want to tell Ninox to Constrain the display in the b table. Going back to the very first image above, we see that the user has entered “Ohio” in the state field named ‘Selected State’. And in the image above, we see that all of the records in the b. table (City) are associated with a state by virtue of the first field – the State field – in that table. By entering the formula a.’Selected State’ = b.State as our Constraint, we are telling Ninox to constrain the view of records in the City popup selection window to only those cities in the ‘Selected State’ field of the current table. And since Ohio is the selected state in the current table, only Ohio cities will appear in the popup as display below.
Using the a/b formulas available in the Constraint parameter of every Reference Field will enable you to create a user interface that is easier to use resulting in a more intuitive user experience.
Be sure to visit us tomorrow at 12:00pm ET or 6:00pm CET for the Learning Lab! This week we’ll be doing an open Q&A so bring your questions so you can earn some gold stars!
Gold stars can be redeemed at the end of the year for prizes, so try and earn as many stars as you can! For more information about the Gold Star Program, click here.
Did you know that Nioxus has built over 130 templates which are available to all Standard, Deluxe and Premier Nioxus members?
Nioxus has created nearly 100 videos and over 200 hours of content teaching you how to use and optimize Ninox, as well as our supplementary products, CalendarPLUS, ReportsPLUS and DocumentsPLUS!
CLICK IMAGE TO ENGLARGE
Ninox makes it easy to report currency values in Dollars, Euros, Pounds and Yen. This copy-and paste Global Function from Nioxus adds 25 new currencies’ currency symbols to the list of defaults that you can use in your personal Ninox Solutions.
The if/then construct in Ninox is a powerful way to enable automated decision making. But when you need Ninox to evaluate a number of different options before making a choice, the if/then structure is inefficient. Say hello to the Case structure. The case/of construct in Ninox allows us to create complex decision-making trees that take our Ninox solutions to the next level of artificial intelligence.
All logos, trademarks and names are the protected property of Nioxus Corporation or their respective owners.
“Ninox,” “Ninox Database” and the blue Ninox owl eye logo are the property of Ninox Berlin and are used with permission.