Being able to send data from the apps you build has been one of the most requested features since we launched the beta. Today, we’re happy to announce that this feature will be part of our October update.
This feature is, at least in its initial incarnation, intended for your users to send data back to you. As such, you’re able to enter one or several email addresses in Calcapp Creator that reports are sent to. Reports cannot be sent to an email address specified in the app itself. This may change in the future. (If this sounds interesting, contact us and let us know what features you’re looking for.)
This is what a button that emails a report looks like in Calcapp Creator and in the apps you build:
Adding a reporting button
Your users send email by pressing a button in your app that you add by pressing Add button in Calcapp Creator:
Buttons by default reset fields to their initial values. Change the action by selecting Action: Send report by email from the drop-down menu in the left-hand inspector:
Click the button in Calcapp Creator and start typing to assign a custom label. We recommend adding buttons to a separate caption-less group to create space between the buttons and the fields.
Customizing the report
Use the inspector to customize various aspects of the generated reports and where they are sent. Add all email addresses you want the reports to be sent to using the Email recipients box. Use the drop-down menu that initially reads Include fields from this panel to determine if fields from only the current panel should be included in the report or fields from all panels.
The most important thing you can customize, though, is whether report data is sent as text or as an attached file containing comma-separated values (CSV). (Use the drop-down menu that initially reads Send as text to customize this aspect.) A text report is great if you don’t need to process the data. This is what a text report might look like:
|Enter a length||52 cm|
|Enter a volume||6.3 L|
|Result (2)||213.03 fl. oz.|
|Cost per unit||$125|
|Price per unit||$265|
|How many?||4,286 units|
°F to °C
|Enter temperature||32 °C|
°C to °F
|Enter temperature||0 °C|
Comma-separated values, on the other hand, are easy to import into various programs, such as databases or spreadsheets like Excel, Google Sheets, LibreOffice or Apple Numbers. This is what the data above looks like imported into Google Sheets:
Text reports use formatted values according to the formatting rules you have set in the inspector. As a result, numbers are formatted with a set number of decimal places and include the units you have set (such as “$” or “lbs”). CSV reports, on the other hand, use unformatted values without units. Numbers often include as many as 13 decimal places.
Dates in CSV files use the same format as popular spreadsheets. The integer part of the number represents the number of days that have elapsed since December 30, 1899, and the fractional part represents the time of day. The number 10.75 thus represents the 9th of January, 1900, at 6pm (18:00). (0.75 means that three quarters of a day have elapsed.)
Hidden fields are
included in both text and CSV reports. You can use hidden fields to
calculate values that should be included in reports but should not be
visible to your users. You could, for instance, have a hidden output
field named Date connected to the formula
TODAY() to capture the
current date and time.
You can also send data by having your app contact your own server directly.