When are expressions in a form recomputed?

Enketo generally recomputes dependent expressions on focus change. For example, if you leave focus of a question named foo, all expressions that reference foo will be recomputed. It does not have a single directed graph of expression relations like Collect does, though, so sometimes there are unexpected extra recalculations. Collect also has some cases with repeats where it will recalculate more than it strictly could. Both do a recalculation pass when a filled form is explicitly saved.

If there's specific behavior you'd like explained, it would be helpful to look at a concrete example.

For text fields, Collect recomputes dependent expressions after every character input. In general, it tries to keep things as up-to-date as possible within a field list so recomputation is immediate after a select change, etc.

Yes, they are treated identically.

Going backwards and jumping do not trigger recomputation in general. I believe there is an exception for filtered choice lists, though, which are recomputed when displayed.

I should have said "at form exit." There is a recomputation pass when exiting and saving a filled form, regardless of whether it's finalized or not. That has not changed.

Bulk finalization will be available from the Drafts screen. Filled forms that successfully finalize will move out of that listing. Filled forms that can't be finalized will stay in Drafts and will be marked as needing action. There will be an android popup (snackbar) showing the number of forms that were finalized and the number that weren't.

1 Like