Knack Blog

The Knack team on web applications, online databases, and beautifully designed products.

 

Feature Highlight: Table Grouping

05/18/2017 Posted by Odalis

Tables are an excellent way to display information in your Knack apps.  Especially since they offer many features to further organize your data for easy understanding.

For example, let’s say you want to create a table that quickly shows which donors are making the most donations. So you start with a table that shows all donations:

2017-05-09_15-41-57

It’s not a bad start, but it’s not easy to tell who your best donors are. That’s where a feature like grouping can make all the difference.

Grouping allows you to group records by a common value in selected table columns. Here’s what your table will look like when it’s grouping the donations by donor:

2017-05-09_15-41-32

 

With a header row for each donor and their donations listed below them, you can see who’s in the giving spirit, at a glance.

Plus, since the “Amount” column was already totaled using a Row Summary, the grouping now shows the total per donor. Though there’s still a complete total for all donors at the bottom of the table:

2017-05-09_16-15-01

How to Add Grouping to a Table

Now that you’ve seen what grouping can do, here are the steps for adding it to your tables.

  1. In the Pages section of the builder, select the page that holds the table you want to add grouping to.
  1. Click on the table on that page to open the editor.
  1. Hover over the column you want to add grouping to and click the edit “pencil” icon to edit that column.
  1. Enable the grouping option by checking the “Grouping” box:

2017-05-09_15-43-05

Note: Any columns that are grouping records will automatically move to the front of the table. A small “group” icon will appear on that column to indicate it is grouping:

2017-05-09_15-47-30

For a quick video walkthrough of this process, see below:

Introducing Dropdown Menus

03/02/2017 Posted by Brandon

We’re pleased to introduce a feature that has been on the request list for a while: dropdown menus.

Knack makes it easy to build large, complex apps: you can create multiple pages for different users to access in different ways.

This can lead to some crazy page menus, where dozens or even hundreds of pages all try to cram in to a single menu (and good luck trying to use them on mobile).

Dropdown menus are a great way to organize and simplify complex page menus like this. Now you can group pages into dropdown menus to simplify your overall menu:

2017-03-01_19-09-04

You can add menu pages to your page tree that can group other start pages together into a dropdown menu:

These menus also play great on mobile.

View the full documentation here in our Knowledge Base.

New Feature: Form URL Vars

01/18/2017 Posted by Brandon

We recently added a feature to help expand and re-use your forms: URL Vars.

URL vars enable you to add values directly to the URLs of your app that can be used to pre-populate insert forms.

URL vars can be used to make forms easier to use and track information from multiple sources:

  • Reduce the friction of registrations or lead forms by pre-populating the names and emails in the URLs you email out.
  • Reuse forms on your websites and apps by setting values based on the source of the links.
  • Track referrals and origins by giving different URLs to different referrers.

We’re currently using URL vars with demo forms on our own site. We use the same demo form but pre-populate the type of app the user wants to demo based on which page the user came from. So each page get’s a slightly different link with that value set in the URL vars.

You could even dynamically create URL vars in links that are sent in custom emails when your Knack forms are submitted.

Setting up URL Vars correctly is a somewhat technical process. We’ve put together this support article to walk you through it:

https://support.knack.com/hc/en-us/articles/115000997068-How-to-Use-URL-Variables-to-Pre-Populate-a-Form

Let us know if you find a great use case for URL vars. We’d love to learn how they are being used.

New Feature: Page Rules

01/11/2017 Posted by Brandon

One key feature you need to effectively create an application is the ability to employ logic.

Logic is what lets you execute different actions based on criteria you define. This enables your app to do much more than simply display and update information.

Logic is at the core of any programming language, but can be trickier to execute in a low-code product like Knack. We’ve added multiple areas to help: record rules, display rules, conditional fields and more. These all present opportunities to add logic to your Knack apps.

We’re thrilled to announce a major new addition to our logic features: Page Rules.

Page Rules allow you to define criteria on the page level to execute specific actions:

  • Show a notification
  • Hide a view
  • Redirect the user to another page
  • Redirect the user to another URL

Here are a few examples of how you could use page rules:

  • Hide a form to edit a record if the page role is not an “Editor”.
  • Hide a form to register for a class if the class attendance has exceeded a specific size.
  • Redirect to a registration form if the logged-in user hasn’t registered.
  • Warn the user if they need to update their data or complete some information.

Pages now have a new tab link at the top called “Rules” where you can define these:

Notifications have additional options to indicate priority. You can designate a notification as a confirmation, warning, or alert, which will color code the message accordingly.

Hiding views allow you to hide one or more views on the page:

We've added some articles to our Knowledge Base with more information on page rules:

Introducing the new builder

10/04/2016 Posted by Brandon

A new version of our Knack builder has been live for a few weeks now and we couldn’t be more excited!

We’ve learned a ton during the 2 years since our last release, and we’ve applied that learning to further optimize and simplify the process of building data-driven web applications.

We put together a new intro video to walk through it (we also dramatically improved our video skills).

Now that the dust has settled we wanted to provide some insight into the goals of this new builder and what changes those led to.

Continue reading...

Upgrading our Text Combo to Text Formula

04/28/2016 Posted by Brandon

We just gave our text combo field so many new super-powers we had to rename it.

Introducing the new Text Formula: it’s a magical combination of our old Text Combo field and the recent equation updates.

You can combine any text values like before but now you can also include a great library of text-based functions.

Continue reading...

Better Data with Validation Rules

01/28/2016 Posted by Brandon

Your database is only as good as the data it contains.

In most cases this is obvious. If you are calculating order totals, you’l need each order to have a number that can be added together. If you are running monthly reports you’ll need some valid dates to group by month.

Other cases are more subtle. You may want to only accept dates that are in the future, or define allowable ranges for a number.

Data that breaks these types of rules may not crash your database, but getting those values right can be just as critical to ensuring your data is meaningful and correct.

Knack has always helped by ensuring field types and providing options for values to be required or unique.

We recently added a feature that dramatically expands Knack’s validation capabilities: validation rules.

Continue reading...

All the Math Functions!

12/09/2015 Posted by Brandon

When we first launched our equation editor we were pretty excited: the ability to use field values in mathematical (and date-driven) equations opened up exciting functionality.

We considered adding more advanced equations like rounding or exponents, but decided to keep it easy with basic arithmetic. We figured our users would appreciate the simplicity and how well it worked.

Boy were we wrong.

We immediately started seeing demands for all sorts of functions (is a hyperbolic tangent function really needed? yes, yes it is).

Many of these opened up major features like mortgage amortization and equipment depreciation. It quickly became a no-brainer decision: we had to completely redesign our equation editor.

We recently released this upgraded equation editor, complete with a whole new library of functions:

A major change is simply how it works. Instead of a largely point and click approach we’ve opted for a typing-based approach:

  • As you type a dropdown menu of fields and functions becomes available to autocomplete.
  • Each field or function in the menu provides some additional contextual info about how to use it.
  • As you construct your equation you’ll get instant feedback on how it works and whether it’s valid above the editor.

New functions

We included a whole slew of mathematical functions that are now available to integrate with your equations.

Some highlights include:

  • ceil – Round a value up to the nearest integer. Example: ceil(4.2) = 5
  • factorial – Compute the factorial of a number. Example: factorial(5) = 120
  • max – Get the maximum of a list of values. Example: max(1,6,9) = 9
  • mean – Compute the mean of a list of values. Example: mean(1,6,8) = 5
  • median – Compute the median of a list of values. Example: median(8,9,1) = 8
  • min – Get the minimum of a list of values. Example: min(42, 100, 3) = 3
  • pow – Calculate the base to the exponent power. Example: pow(7,2) = 49
  • randomInt – Get a random integer between two values. Example: random(1,42) = 36
  • std – Compute the standard deviation of a list of values. Example: std(1,5,42,78) = 36.07861785970558
  • sqrt – Calculate the square root of a number. Example: sqrt(81) = 9
You can view the full list of functions here.

Conditional Equations

You could always use conditional rules to include logic with field values an equation uses, or to choose from multiple equations.

You can now include logic right in the equation to create conditional equations.

It’s called a ternary operator and works like this: (condition ? equation_1 : equation_2)

This means if your condition is true, Knack will use the equation followed by the ? symbol. If your condition is false, Knack will use the second equation followed by the : symbol.

Continue reading...

Search Upgrades: Find More Needles

11/30/2015 Posted by Brandon

Searches and filters are critical components to any online database application.

They’re what help you find the needles in the haystack of your data and turn it into something actionable. If you can’t find it, you can’t learn anything from it.

We’re making a big effort in improving our search and filters, starting with some recent upgrades to our search view.

This includes new features that enable more flexible search layouts:

  • Display filters into up to 3 columns
  • Control label placement
  • Group filters together and add titles and instructions

This also includes a big search improvement for how multiple choice and connection fields work:

  • Allow a single option or many options to be selected.
  • Display as dropdowns or checkboxes and radio buttons.
  • Determine to show results for ANY match or ALL matches.

This provides a lot of flexibility for creating AND/OR type searches with multiple options.

For example, this is perfect for searches that are common in real estate apps, where you may want to find properties with any match from the list of house types but match all of the selected features.

Stay tuned for more updates on and/or searches and more improved filters.

Continue reading...

Connection Upgrades

11/19/2015 Posted by Brandon

Connections are at the heart of any database. Being able to connect one record to another record is what separates a spreadsheet from a database.

Our goal for Knack has always been to enable unlimited flexibility with connections.

Need a one-to-one, one-to-many, or many-to-many relationship? No problem. Need more than one connection between the same objects? Can do.

Once your connections are set up we automate everything behind the scenes so they are simple to use and leverage throughout your application.

We recently released some new features that continue to improve this flexibility and automation.

Continue reading...