Creating Your First NExS App
In this tutorial we’ll create a very simple NExS app to show how it’s done. The app we’ll create is a Body Mass Index (BMI) calculator for adults using the formula published by the CDC:
BMI = weight (lb) / [height (in)]2 x 703
To really benefit from this tutorial, you should click the sign in link above, if you have not already done so, and set up a NExS account. Don’t worry, we don’t share your information, and you don’t need to put in a credit card. You can create as many NExS apps as you want - it doesn’t cost you anything until you want to deploy them for others to use. (Which we of course hope you will!). The easiest way to set up your account is to sign in with your Google credentials.
The first step in creating a NExS app is to design it in a spreadsheet. Click below to download the spreadsheet we’ve designed for the BMI calculator, then open it in Excel (or Google Sheets) to follow along:
The spreadsheet looks like this:
The three “input” cells are B3 (height in feet), D3 (height in inches), and B5 (weight in pounds). Cell B7 contains the BMI formula from the CDC website. (We’ve wrapped it in an IFERROR() function so that it displays a blank rather than an error message if the input cells are empty.). In cell D7 we’ve entered the formula =IFNA(VLOOKUP(B7,G3:H6,2),"")
to display the interpretation of the BMI value (again from the CDC website). (This IFNA() just makes it look nicer when a #NA value is returned.)
Now that we have our BMI calculator working in the spreadsheet, we need to specify how to turn it into app that can be installed on a device or embedded in a web page. To do this we need to:
- Give our app a name - we'll just call it "BMI Calculator"
- Specify what the user will see. This is called a "view". It is just a block of cells. In our case, we want the view to be Sheet1!A1:E8.
- Specify which cells the user can change within the view. These are called "inputs". Our inputs are the height in feet and inches (cells B3 and D3) and the weight (cell B5).
That is the job of a special worksheet named "nexs.app". Simply add a new worksheet, name it "nexs.app", and add the information above, like so:
A | B | C | |
---|---|---|---|
1 | app | BMI Calculator | |
2 | view | Sheet1!A1:E8 | |
3 | inputs | B3, D3, B5 |
That's all there is to it. Save the spreadsheet, upload it to NExS, and your BMI calculator will be automatically configured, created and ready for use. Here's the calculator we just created:
In summary, here are the steps to create a NExS app:
Design your spreadsheet. Make it simple and clean. As a best practice, use a color code for the cells that will contain the inputs to your app. In this example, I’ve made all the input cells gray with a black border.
Add a “nexs.app” worksheet to specify your app’s configuration; e.g., its name, its views (what the user sees), and its inputs (what the user can change).
Upload your spreadsheet to the NExS platform.
Click “Preview your App” to see what it will look like and how it will work when you deploy it. If changes are needed edit your spreadsheet and re-upload.
When you’re satisfied with the look and feel, click “Save and Continue”. You’re done!
To publish your app so that it can be used by others and embedded in a site, a NExS subscription is required. Contact us for more information.