Letter: Multiple button actions and report recipients

Can a formula be used to send reports to many email recipients and can a button both open a report and send it? Matt posed this question and received a reply from our co-founder David, who shared some of our future plans for enabling buttons to execute formulas.

Matt wrote us today, asking about sending reports to multiple email recipients and wondering if it was possible to both send a report and open it from the same button. Our co-founder David answered his questions and shared some of our future plans in his reply:

Hi Matt and thank you for your kind words,

I’m trying to add multiple email recipients for a report using fields but I’m struggling with how to list multiple fields in the separator. What’s the syntax for this? Also is it possible to list an email address and a field?

The Reference sidebar has this to say about the Recipients property of email buttons:

Returns the recipients of mail sent through an email button. This text string must consist of one or several email addresses. Multiple email addresses may be separated by commas or semicolons. (Use the concatenation operator "&".)

Text result Button1.Recipients

That means that you can use a formula such as:

"name1@example.com, name2@example.com"


"name1@example.com ," & Email2 & ", " & Email3

where Email2 and Email3 are fields named Email2 and Email3, respectively.

Are there any plans to have one button two things e.g. both view on device and send at the same time.

Yes, we would like to enable buttons to run “action formulas” which would be allowed to reference a new class of functions, “action functions.” An action function would be able to “do things,” as opposed to simply calculating values. There would be action functions corresponding to the current button actions, including the ability to email and open reports and reset fields. Further, we would like to enable an action formula to contain multiple parts, separated by semicolons. That means that you’d be able to write an action formula like the following:

IF(Field1 > 42, RESET(Field1.Id))


EMAILREPORT("TEXT", "name1@example.com ," & Email2 & ", " & Email3, "sender@calcapp.net", CalculationPanel1.Id, Group2.Id, Field3.Id, Field4.Id); OPENREPORT("TEXT", CalculationPanel1.Id, Group2.Id, Field3.Id, Field4.Id)

The first formula would only reset a field if its value is greater than 42. The second formula would both email a report and open it and would use the same recipients as I listed above. It would include all fields of CalculationPanel1, Group2 and the fields Field3 and Field4.

(In the future, we need a way to refer to fields. Field1 won’t do, because that actually refers to the value of Field1, so we’re thinking of adding “Id” properties to all types which would refer to the “thing” in question itself, instead of a value.)

Also, we’d like to add the action function SET, which would set a value. That would be a powerful way of setting a field value, making a group visible or invisible or changing the current panel:

IF(Field1 > 42, SET(Group1.Id, "Visible", FALSE))


SET(App.Id, "CurrentPanel", CalculationPanel1.Id)

The next release we’re working on – which will hopefully be released in February – will add a new start screen to Calcapp Creator, which will double as a way of setting app-wide properties. By default, this screen will be known as “App” in formulas and will probably have properties like UserEmailAddress and ZoomLevel (enabling the whole interface to change size) initially. Adding a CurrentPanel property to this app-wide holder of properties in conjunction with the SET action function would enable you to use formulas to change the current panel.

Final, bit of feedback, would be useful if you could exclude hidden fields from a report.

Absolutely. We would like to enable you to fully customize reports. Meanwhile, what you can do is create a new panel solely for sending reports and adding hidden fields which reference the fields you’d like to have included in the report. That way, you can get a fully custom report sent today, with the only downside that you’ll have to direct users to a panel only containing a “Send” button, which is less than ideal.

« Release: Our January, 2018 update is here Tip: Include only selected fields in reports »