Articles in this section
Category / Section

6.4 Description Formula

Published:
Updated:

The Description Formula field can be used in Form, Repeat and Link elements to customize data description in data listings and for e.g. repeat headers. You may type in static text directly in this field, but it is generally used with parameters that change every time the form or repeat is filled out. In other words, the formula picks out certain data the user has entered in the form and displays them ‘outside’ of the form, so you don’t have to open it to find important data.


Note: You can add return characters (line break) with the Enter key in the formula to format it better.

651.png



Description Formula of a form

The Description Formula property of a form is used to give each filled form a description/ summary based on its content. That way you can easily distinguish between filled forms without having to open them one by one from the Dashboard.

A description can contain any text as well as element IDs found in the form (see list of functions below). By default, it shows the first 5-7 elements of the form but it can be customized to contain any of the form’s elements.

Example

{#elementX} – {#elementY} where elementX is filled in by the user as “ABC” and elementY is filled in as “123”, will produce the description = ABC – 123

For instance, this specification …

652.png

… creates the following information shown in the form’s data listing in the Dashboard, under the heading Description:

653.png

The Description Formula will also be be used as the name for the PDF file sent automatically in email notifications, see Designing: 8.2 Automatic email notifications with PDF reports and form links.
The formula is also listed in the Zegeba app, and shows the difference between one data capture and the next. See Using: 3.6 Viewing and editing existing data.



Description Formula of a link to a repeat

A link can link to a repeat instance by setting its Reference property to e.g. “repeat://elementIdOfRepeat”. The link is a one-to-one link to a repeat instance and the heading of the repeat can be customized by the link by using the Description Formula.



Description Formula of a repeat

A repeat description is used to give each repeat instance a unique name based on some content, for instance the question that the information given in the repeat is about. Format and usage is the same as for Form Description, with the addition of a way to reference variables from within the repeat.



List of Description Formula functions and properties

654.png



Alternative value if description is processed with an empty text as a result

In some cases, a value is not always set due to e.g. rules or the state of elements of the form. When this happens, some users may want to add an alternative text e.g. “NA” if no answer is set yet.

The format is
{#element_ID|Alternative Text}

where “Alternative Text” will be shown if there is no answer to the question with the element ID “element_ID”.

655.png

Was this article useful?
yes
No
Help us improve this page
Please provide feedback or comments
Access denied
Access denied