Using $(previous_question) as default or in constraint of a “next_question” causes an error in deployment

Using $(previous_question) as default or in constraint of a “next_question” causes an error in deployment…

Welcome to the community, @jcpoussin! I checked this out with a dummy question and it did not have any issue:

In the survey tab of your XLSForm:

Image 1

Data entry screen as seen in Enketo:

Reference XLSForm:

Dynamic Default.xlsx (9.5 KB)

I do not know what happend: the code of “$(previous_question)” was misinterpreted in the XMLform, and it was impossible to correct the error in the regular interface or in the XLSform.
I erase the form and built another one and now it works

1 Like

Maybe it would be interesting to have the possibility of “replace form” with a XMLform

A date question does not accept $(previous_date) as default… Is it normal?

Hi @jcpoussin, are you using curly brackets (${previous_date}) or round brackets ($(previous_date)) in your syntax?

Hi Josh,
I used round brackets as indicated in XLSform documentation: $(previous_date).

Hi @jcpoussin, I haven’t seen the XLSForm documentation use round brackets. Can you please try with the curly brackets and see if the issue persists?

Or maybe try this approach that should solve the issue (by placing the date in the calculation column instead of the default column):