I need to change the type of an existing column/question, for example, from text box to number or drop-down. How can I do this? Thanks in advance!
On a new project, just delete the old questions and replace them.
On existing projects (with entries already collected), you cannot do it. If you remove a question, you will lose the answers to that question.
You could, however, download a backup of your data and then manually fill the missing data in, either in Epicollect5 or the exported csv file.
The main reason changing question type on the fly while preserving existing data is not implemented is because it could lead to data inconsistency and invalid entries. For example, if you start with a TEXT question, collect some entries and later change that question to a NUMERIC one, suddenly all your previous TEXT answers containing letters will become invalid since a NUMERIC question type does not allow letters, only digits.
I get that, but some changes wouldn’t cause a problem. For example, I have a text field that I would like to change to a Dropdown. Dropdown doesn’t appear force any particular input type, so should be compatible. Come to think of it, that behavior is a bit odd. On most databases, having a dropdown of possible inputs is logically separate from the field type — dropdown is an option within the field specification, not a field itself.
Dropdown doesn’t appear force any particular input type
That is not correct. A DROPDOWN only allows you to pick one of the possible answers. A TEXT field can be anything.
On top of that, DROPDOWN answers behind the scenes are mapped against a unique identifier (like
62c3cf4b8c830) while TEXT answers are not.
This is done to:
1 - make Epicollect5 mapping feature work. →
2 - be able to rename/correct typos on possible answers and have the changes propagated to previously updated entries. →
As you can see, switching from TEXT to DROPDOWN would be pretty challenging to implement. Can you imagine doing that for all the possible combinations of all question types?