You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an XLSForm specifies an entity update, an expression to get the existing entity's baseVersion is generated by pyxform. This expression reads from the entity list that the update targets, assuming that it will always be attached. However, there are useful forms to write that could update an entity without having the entity list attached. In particular, when using barcode ids offline to identify entities, there may not be any need to query the entity list.
The issue stems from Validate because JavaRosa specifically detects instance calls on instance names that aren't defined:
Some ideas for what we could do when the entity list isn't attached:
set the baseVersion to 0. That will never exist because versions are 1-based and so there will always be a conflict detected
set the baseVersion to 1. Submissions from forms that are only ever supposed to make one update would never get conflicts but multiple updates would result in conflicts
Other information
This kind of form is only practical if the barcodes are created from entities that are already registered. Maybe it's not a hugely useful/common scenario so we could wait until it comes up to address it. It may become more practical once bulk upload is more approachable.
The text was updated successfully, but these errors were encountered:
Problem description
When an XLSForm specifies an entity update, an expression to get the existing entity's
baseVersion
is generated bypyxform
. This expression reads from the entity list that the update targets, assuming that it will always be attached. However, there are useful forms to write that could update an entity without having the entity list attached. In particular, when using barcode ids offline to identify entities, there may not be any need to query the entity list.The issue stems from Validate because JavaRosa specifically detects
instance
calls on instance names that aren't defined:Steps to reproduce the problem
Try to convert a form like https://docs.google.com/spreadsheets/d/1ALphkUqVgXGBV8jmCx0wohHDXknH1q3BHFQOj16IuA4/edit#gid=1068911091
Expected behavior
Some ideas for what we could do when the entity list isn't attached:
baseVersion
to 0. That will never exist because versions are 1-based and so there will always be a conflict detectedbaseVersion
to 1. Submissions from forms that are only ever supposed to make one update would never get conflicts but multiple updates would result in conflictsOther information
This kind of form is only practical if the barcodes are created from entities that are already registered. Maybe it's not a hugely useful/common scenario so we could wait until it comes up to address it. It may become more practical once bulk upload is more approachable.
The text was updated successfully, but these errors were encountered: