Generate serial Number from old submissions with max function

@Moteb_Marei There is no easy way to auto-increment a globally unique ID without an always on connection. Your options are to generate a unique non-repeating ID or use some combination of metadata like device ID and data within the form to generate a probably unique ID.

If you'd like to increment a number across multiple submissions on a single device, you can use the ODK Counter app. Incremental counter - #10 by LN has a link and sample form.