getodk / xforms-spec

The XForms-derived specification used in the ODK ecosystem. If you are interested in building a tool that is compliant with the forms rendered by ODK tools, this is the place to start. ✨⚒✨
https://getodk.github.io/xforms-spec/
30 stars 26 forks source link

Document last-saved secondary instances (for auto-fill) #228

Closed cooperka closed 5 years ago

cooperka commented 5 years ago

Related PR: https://github.com/opendatakit/collect/pull/2882

cc @lognaturel

lognaturel commented 5 years ago

Sorry about the delay getting back to you on this, @cooperka! This feels more tutorial-like than the rest of the specification. I think it'd be great content for user-facing documentation. In particular, we don't mention Collect or any other specific implementation of the spec in this document.

I would tend to add a new section below https://opendatakit.github.io/xforms-spec/#binary-endpoints called something like "Virtual endpoints" and have a table with jr://instance/last-saved as the only row for now (with more probably coming - https://forum.opendatakit.org/t/odk-xforms-spec-proposal-introduce-a-virtual-instance-for-metadata/19122).

I think these sentences you had feel appropriate either in the table or below: Note that the "last-saved" terminology is significant -- it refers to the form instance that was saved most recently (as opposed to last-opened or last-finalized, for example).

The most common use case for this feature is to "auto-fill" specific form fields with the last-saved value via odk-instance-first-load.

Hopefully this makes sense and doesn't feel too nit-picky!

cooperka commented 5 years ago

Thanks for the feedback @lognaturel, done.

lognaturel commented 5 years ago

That looks perfect to me! Will give @MartijnR a day or two in case he has feedback on the contents or organization. Thanks so much. 🙏

MartijnR commented 5 years ago

Looks great. Thanks @cooperka @lognaturel !