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/
31 stars 26 forks source link

Redefine form with entity `create` AND `update` #317

Open seadowg opened 3 months ago

seadowg commented 3 months ago

The spec currently address forms that have an entity node with truthy create and update like so:

MAY also have a bind to a create attribute as previously defined. In that case, the form designer is responsible for making sure that the id is correctly populated in each case and that the update and create conditions don’t result in both being truthy at the same time. If both are truthy, the spec consumer processing submissions should do both and one of them will fail.

The actual result of "should do both and one of them will fail" isn't clear here. We should define what exactly happens when processing submissions for these cases:

  1. A create form (id, create="true" and no baseVersion) that also has update="true"
  2. An update form (id, baseVersion and update"true") that also has create="true"
seadowg commented 3 months ago

cc/ @matthew-white @ktuite @lognaturel