Knack Blog

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

 

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...

Moving and Copying

10/21/2015 Posted by Brandon

One benefit of having a passionate user base is that they don’t hesitate to let you know how you can improve your product.

A major refrain over the years have been variations on the need to copy and move different things:

  • “Can I copy this form I just built to another page? I don’t want to create it again.”
  • “I created a calendar but put it on the wrong page, can I move it?”
  • “How can I copy the fields from this object into another object”.

We listened! We’ve now incorporated move and copy functions for objects and fields in the database and pages and views in the interface.

Copy and Move Views

You can now drag any view in your interface to move and copy it to another page.

Simply drag it into the page from the left menu:

You can only copy a view to an eligible page: for child pages this means the page knows about the same object as the view you’re copying. For example, you can only copy an employee details view to another page that is displaying a specific employee record.

Once you drop it over a page you can confirm if you want to move or copy that view.

If you copy a view that links to child pages those pages will also be copied. For example, copying a menu linking to a new page or a table linking to a details page.

You can also copy views using the settings link in the top right when you are editing a specific view:

Copy Pages

You can copy top level pages from the right menu:

This will create a new copy of that entire section: the top level page and any child pages.

If you need to copy specific child pages then you can copy the view that links to those page (see above).

Copy Objects and Fields

You can copy objects and fields using the link in the right column:

You can choose to copy to an existing object or create a new object, and then choose which fields to copy:

Currently only fields will be copied. Future upgrades will include the ability to copy your records as well.

We’re constantly working on improving the builder experience and we hope these changes will make it easier and faster to work with your application. As always, let us know what else we should be working on!

Continue reading...

Enhance your Tables

10/05/2015 Posted by Brandon

Your tables are about to thank you. We’ve released some great new options for enhancing colors, icons, backgrounds, and more!

To access these new features, edit a column in any table in your interface. A new Layout tab let’s you control width and alignment:

The Display Rules tab let you create conditional rules for applying different colors, icons, and styles to each value in that column:

Here are some popular examples for enhancing your table:

  • Display icons for different project statuses
  • Display expiring dates in red
  • Display high priority leads in bold
We’re excited to see some enhanced tables out there, and we have more options in the works!

Continue reading...

Report Groupings

09/22/2015 Posted by Brandon

You can now add multiple groups to your reports!

Most reports in Knack work by running calculations on groups of records. For example, you could group orders by date and then calculate the average order total for each date. You can then display these calculations in line or bar charts.

We recently added the ability to add multiple groups. Here’s an example where orders are grouped by both date (month) and by product:

We also expanded which fields are eligible to use for groups. Beyond dates, connections, and multiple choice, we added yes/no and most of the text and numeric fields.

Notes:

  • The most groups you can add is two.
  • You can only add 1 calculation if you have more than one group.

Continue reading...

Accept Payments with your Knack App

09/02/2015 Posted by Brandon

When we first started brainstorming about the idea that would lead to Knack we always talked about including payments. It was a while ago, but I’m pretty sure that some dollar sign or credit card drawing was on one of those early whiteboards.

It made perfect sense: E-Commerce adds so much power and really opens up the potential for the types of apps that can be built with Knack:

  • A customer portal can allow customer to pay invoices.
  • A purchase order app can include payments for those orders.
  • A donation management app can take live donations that plug right in.
After a lot of careful thought and development we’re thrilled to release our first round of E-Commerce features so you can now accept payments with Stripe or PayPal!

Please note that E-commerce features only available on our Pro plans and above.

Continue reading...

User Workflow

07/22/2015 Posted by Brandon

User logins are one of Knack’s most powerful features. They let you build applications where users can log in and have permissions to access specific records.

We recently converted two user attributes into database fields:

  • User Status: this controls whether the user has active access to log in. Options include “pending approval” and “inactive”.
  • User Roles: this controls which roles the user is assigned to. Each role can have access to different pages of the app and be connected to different records.
These two attributes used to be private settings that couldn’t be exposed in your app. By making them fields you can now use these in your apps just like any other field — including filters, form rules, and the API.

This opens up some powerful user workflow features:

User Paywalls

Form rules, tasks, and the API can be used to update the user status to “approved” or “inactive” when a certain transaction happens. If you start a user as “pending approval” then they won’t be able to login until the status is updated. You can even use Zapier to update this status when a payment is made from Stripe or Paypal.

Role Promotions

Likewise you can assign a user role with form rules or tasks. Conditions can be used to determine which user role to assign. For example, a user can be assigned a role when a certain amount of points are scored.

User Management

Because these attributes are now easily controlled from your app, you can create a specific page for “Admin” users to login and manage user rights and statuses without needing to access the builder.

We’re really excited about the possiblilties this opens up to add user workflow features to your online database. Let us know how you’re using these so we can share other great examples.

Continue reading...

Icons

07/14/2015 Posted by Brandon

You can now add icons to the menus in your apps!

Here’s an example of a menu with icons added:

Edit a link in a menu view to add an icon:

To add an icon to your app’s global page menu first click on a page from the list in your interface, then click on the “Page Options” link in the right column.

There’s a ton of icons to choose from! Not only are icons fun, they can help guide and educate the user experience.

Continue reading...

Task Upgrades

07/02/2015 Posted by Brandon

Scheduled tasks are one of the most popular features on our Pro plan.

Tasks let you define actions to send emails, update records, or even insert new records based on dates and criteria you define.

We’ve recently posted some improvements to scheduled tasks, including some new features.

Tasks are now managed with a tabbed pop-up window:

New features include:

  • Next run date – this will always list the next date the task will run and can be changed at any time.
  • Pause – temporarily pause the task so it won’t run. The task won’t be deleted and will maintain it’s schedule and can still be manually run.
  • Manual Run – run the task in real-time on demand.

We’re also now logging each time a task is run, along with the results and how many records the task processed. This way you can confirm the task ran and is processing the records you are expecting. You can view a history of these logs in the History tab.

As always please let us know what other task features you’d like to see!

Continue reading...