How to define default value

I have facility assessment form and there is question asking called Facility number. I need this value to be default zero and increasing by 1 when the questionnaire filled

Hi Tewelde,

You can use the coalesce function to add a counter to your form. For example, if your question ID is facility_number (and has been saved as a case property), this function would look like:

coalesce(#case/facility_number, 0) + 1

Hope this helps!

Cheers,
Kaley

Hi Kaley

Thanks for the quick reply.As this is one times survey i can't save facility_number as case property. Can i?

Hi Tewelde,

You are correct that if you are using a one-time Survey form you can't save facility_number as a case property and the function I shared won't work. However if you are trying to determine how many times the survey form has been filled out in total, could you export the form data and from that data determine how many times the form has been filled out?