There are a couple options here:
- Preload the ids and not let enumerators edit them; then they will necessarily be unique.
- If they need to be created in the field, you can check that an id is used once and only once using async_assign. For example, in section 2_2 we check that everyone enters data for one and only one father with zcheck_father: quest2_00_0.xlsx (723.1 KB)
Here’s a zip with the async_assign:
customPromptTypes.js.zip (2.5 KB)
You need to set up a query (here, count_fathers) and then async_assign_count can count them.
There’s probably some more efficient method as well, but this would at least let you count instances of an id and make sure there is one and only one with a constraint.
Best,
Caroline