Adding buttons
Your app can contain buttons that act on the information entered by your users and calculated through formulas.
Add a button by pressing Add button in Calcapp Creator:
Here’s the full list of button types you can add:
- Email report buttons send email, possibly including reports.
- Open report buttons open reports on the user’s device.
- Server relay buttons send data to services like Zapier.
- Formula buttons run action formulas.
- Alert buttons show messages.
- Clipboard copy buttons copy text to the clipboard.
- Go back and go forward buttons change the active screen.
- Print screen buttons launch the user’s print dialog.
- Compose email buttons launch the user’s email client.
- Compose SMS buttons launch the user’s text message client.
- Dial buttons launch the user’s dialer.
- Open map buttons show maps using the user’s map app.
- Browse buttons show a web page in the user’s web browser.
- Reset buttons reset fields.
Report buttons
Email report buttons send email:
The inspector looks much like a regular email client, with the ability to set recipients, a subject line and a body. (You can also set a sender, though we recommend setting a Reply-To field instead.)
A major difference is that you can include formula fragments between
{{
and }}
markers. (This applies to all text
properties in Calcapp.) Th formula fragments can be simple references to
fields or include arbitrarily complex calculations.
You can also include fields in your email as a table with two columns: one containing field labels and one containing field values:
Break-even analysis
Fixed cost | $600,000 |
Cost per unit | $125 |
Price per unit | $265 |
How many? | 4,286 units |
If you want to include field values, be sure to select Include this screen’s fields, Include all fields or Include specific fields from the drop-down that initially reads Don’t include fields.
If you select Include specific fields, a property labeled Included fields appears, along with a new pen button for determing what fields to include visually:
When you press this button, this box appears:
When you’re done selecting your fields, press Next to change the order of the fields in the report:
Fields and their values are by default included in the email body itself. You can also include them as a simple attached PDF document or as a file containing comma-separated values (CSV), which can be imported into spreadsheets and databases. (Instructions for Excel, Google Sheets, LibreOffice and Apple Numbers.)
Customize whether CSV field values are laid out horizontally or vertically using the Format for values section in the inspector. You can also set the delimiter and decimal separator explicitly. (If not set, they use default values informed by the language your app has been configured to use.)
You can remove headings from reports, choose to exclude hidden fields or opt to include blank values (fields where no values have been entered) using the inspector. Ensure that all fields whose values have been sent are reset to their initial values by toggling the Reset fields afterwards property.
Open report buttons open reports, contaning fields and their values, on the user’s device itself. The reports are opened as either plain text files, HTML files, PDF documents or CSV files.
Server relay buttons
A server relay button can send data to services. They can do things like adding a row to a Google Sheets spreadsheet, sending a message to a Slack channel and creating a Salesforce lead instead.
These features require a third-party service, like Zapier, Microsoft Power Automate, Integrately and Zoho Flow. We have a video tutorial that makes an app built with Calcapp add a row to a Google Sheets spreadsheet, through Zapier.
(You can also forego the use of third-party services and write the code that processes data from apps yourself, or hire someone to do so. Learn more about how that works.)
Formula buttons
Formula buttons run so-called action formulas, which have access to 30 action functions. A formula button can do everything that a regular button can do, but with a lot more flexibility.
For instance, a formula button can perform many actions in quick succession, and it can ask users questions and act on the collected information. It can also send a report only if the data entered into the app is valid and show an alert box otherwise.
Action formulas are covered in detail in the next guide.
Alert buttons
An alert button displays a message to your users, with a single button that dismisses the message:
All information displayed in the alert box can take into account information entered by your users and calculated by your app.
Navigation buttons
A go forward button that you don’t customize moves the user forward to the screen you have defined in Calcapp Creator (reachable using the button in the top-right corner of your app).
Similarly, a go back button that you don’t customize moves the user back one screen.
A go forward button can be customized to move the user forward to whatever screen you select in the inspector. To use conditional logic, associate a formula with the Target property that uses the IF function.
Here’s an example of such a formula:
The formula above checks to see if all items of Screen1 are valid . If so, the user is brought forward to DetailsScreen. Otherwise, ErrorScreen is shown.
You can also customize what screen to go back to using a go back button, with a screen you select in the inspector or through a formula. However, if you select a screen that the user has not previously visited, nothing will happen.
Browsing the web, printing, composing an email and more
The remaining seven button types copy values to the user’s clipboard, open a link in the user’s web browser, dial a phone number for the user, compose an email or a text message (SMS), open a map at a certain location and offer to print the current screen.
Clipboard copy buttons do what their name suggests. The copied value can be set through a formula.
Print screen buttons simply invoke the system print dialog, which typically not only supports printing the current screen, but can also convert it to a PDF file.
Browse buttons open links in the user’s web browser. A button is often more attention-grabbing than a text link. Browse buttons allow you to decide where the links open (for instance, in a named browser tab, or replacing your app).
An email compose button makes it possible for users to send an email using their standard email client (a native app or a web-based service). You can pre-fill most fields, including the body and the recipients.
Text message compose buttons send SMS text messages and dial buttons open the user’s dialer. They typically only work on cell phones.
Finally, open map buttons open a map using either a search query (which can be an address), or coordinates (latitude and longitude). The user’s installed map app is preferred. If all else fails, Google Maps is opened in the user’s web browser.
Next, learn about formula buttons and running actions »