Feature: Automatic naming of fields

Starting with our next release, fields will be given names based on the captions you type for them at all times. This makes formulas easier to read. You can still assign names manually.

We are currently busy adding support for cross-references and calculated properties, but have also found the time to improve a minor but important aspect of Calcapp Creator: how names are assigned to fields. You use field names to reference fields in formulas, which goes a long way toward making Calcapp formulas easier to read than spreadsheet formulas. Thanks to field names, you get formulas that read Weight / 1000 * Intake instead of C23 / 1000 * A3.

Spreadsheets support assigning names to cells which can then be used in formulas, but names need to be assigned and updated manually. In practice, we have found that the feature is rarely used. We can do better in Calcapp Creator, because fields are not only associated with a name, they are also associated with a caption displayed to the left of the field. That means that Calcapp Creator can automatically assign names based on the captions you enter.

(You could argue that captions are found in spreadsheets too, usually in the cells to the left of the cells that hold the values. That’s true, but spreadsheets aren’t aware of what cells you use for captions and would as a result be hard-pressed to assign cell names based on the contents of the cells that serve as their captions. Spreadsheet grids are infinitely flexible, but that flexibility has its costs.)

Today, when you add a new field by pressing the Add field button and start typing a caption immediately, the field name will also update. If you enter “Name of patient” as the caption, the name “NameOfPatient” will automatically be assigned to the field. (Field names can’t have spaces in them.)

That works great most of the time, but breaks down if you don’t immediately start typing a caption after adding a field. What if you add the ten fields you intend to use by pressing the Add field button ten times and only then start editing their captions? Or if you change your field captions later? What happens is that your field names aren’t automatically updated. That means that you wind up with a mixture of fields with proper names and fields named “Field1,” “Field2,” etc. In the worst case, your fields will have names that no longer reflect what you use them for (because you have changed the caption).

While you can change field names manually, we have found that few of our users take the time to do so. And why should you, when you have already assigned perfectly fine captions?

The solution is obvious: Starting with our next release, names of fields will always reflect their captions unless you take the time to change the name manually. (A field you have named manually won’t have its name updated when you change its caption. You can delete the entire name you have manually typed to make the name automatically reflect the caption yet again.)

As a result of this change, our next release should help you keep your formulas clean and readable. Also, don’t forget to use hidden fields to cut down on formula repetition.

« Feature: Send PDF reports A progress report »