Previous Next

By default, whenever a new form is filled out, it is named the same thing: the title of the form. Unless users override this default and enter a different name when they save each form, the Edit Saved Form, Send Finalized Form, and Delete Saved Form lists in SurveyCTO Collect will show lots of forms all with the same name; the only way to distinguish them will be based on their "last saved" time and date.

Alternatively, you can automatically name each form in a way that utilizes the data entered into the form. For example, you might include a unique household ID and/or a respondent name in the name of the form. To do this, you need to specify an instance_name setting in your form's settings worksheet.

There is currently no way to dynamically name filled-in forms using the online form designer. However, you can choose Save... Download form definition to save the form definition from the designer, follow the instructions below to add the necessary code to the spreadsheet form definition, and then choose Upload to re-upload the form definition to the designer. (While the designer won't show the option for dynamically naming forms, it also won't remove or overwrite anything that has been placed in the spreadsheet form definition.)

In the spreadsheet form definition, start by adding a new column to your form's settings worksheet and entering "instance_name" into the first row of that new column. Then, in the second row of that new column, add an expression like the following:

concat('HH SURVEY - ', ${hhid})

Replace "HH SURVEY" with whatever prefix you want to include in form names, and replace "hhid" with the name of a field contains a unique or meaningful identifier for your form. Alternatively, if you want to include multiple fields, you could enter an expression like this:

concat('HH SURVEY - ID ', ${hhid}, ' - Name ', ${respondent_name})

In this example, both a household ID and a respondent name are included in the form's name. That way, when you list filled-out forms on a device, you will be able to more easily find specific instances.

Using variations of the concat() function, you can concatenate together an arbitrary number of literal strings (enclosed by single-quotes) and an arbitrary number of form fields (enclosed by ${...}). Note that whatever you put in the instance_name column should evaluate to a string; so, for example, "today()" alone won't work to name forms using the current date, but "string(today())" will work. See Using expressions in your forms for more on the kinds of expressions you can use.

Previous Next