This works on most databases, but what if you have some files where the boolean-type data isn't so conveniently formatted? What if, for example, an "X" is used to indicate a true value in one of your columns? Or what if you just wanted to show a checkmark whenever a status column contains a specific value (i.e., "shipped" status)? In such cases, the easiest way to achieve this is to configure a separate calculated field in your data source that "calculates" when a checkmark should show, then include that calculated column in your grid. Selecting the boolean format config for a columnĪs you can see, the boolean configuration assumes your underlying column contains Y/1/true/on values to indicate when a checkmark should show on the grid. In the format window, expand the "Miscellaneous" section and click on the first row, which converts any positive boolean-like value into a checkmark. The first step is to go to your Grid widget's Columns tab, hover your cursor over the far right column associated with a boolean field and click on "FORMAT" to bring up the formatting window: Opening the FORMAT window for a column Incorporating these checkmarks into your own Nitro Query grid apps is quite simple. Grid #2: Same customer list with checkmark values for "Inactive" and "Credit Hold"Īs you can see, it's much easier for your eyes to spot the inactive or credit-held customers by exception in Grid #2 via the checkmarks, versus sifting through a bunch of 1/0 or Y/N values in Grid #1. Which list makes it easier to spot customers who are inactive (third column from left) or on credit hold (far right column)? Grid #1: Customer list with raw values for "Inactive" and "Credit Hold" To illustrate the concept in action, consider the following two examples of grid apps mapped over the same data source depicting a list of customers. You can apply the same concept to edit grids as well, so instead of requiring your users to enter a "Y" or "N" into, say, an "Active" field in your physical file, you could present them with a simple checkbox to click on instead. When you're creating a Nitro Query grid app that includes such columns, you can make "truthy" values stand out much more clearly by replacing the column text with a visual checkmark. Very often lists of business data include columns that can be classified as boolean, with text representing values of yes/no, true/false, 1/0, etc. Wrapping up 2017 with a simple but powerful tip for Nitro Query grid apps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |