# Create and update Entities from repeats

**URL:** <https://forum.getodk.org/t/create-and-update-entities-from-repeats/55163>\
**Category:** Ideas\
**Tags:** entities, odk-central, odk-xlsform, odk-collect\
**Created:** [June 3, 2025, 9:34pm UTC](https://forum.getodk.org/t/create-and-update-entities-from-repeats/55163 "2025-06-03T21:34:57Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [February 3, 2026, 6:16pm UTC](https://forum.getodk.org/t/create-and-update-entities-from-repeats/55163/14 "2026-02-03T18:16:20Z")

</div>

We have now updated the XLSForm model based on feedback to simplify the `entities` sheet and to make it clearer on the `survey` sheet which `save_to` belongs to which Entity. Our current plan is for XLSForm to allow any number of rows on the `entities` sheet as long as the `list_name` column value is unique across them. In other words, a submission will be able to create or update many Entities and the only way to write to multiple Entities in the same list will be to use a repeat.

This means we will remove the undocumented `repeat` column from the `entities` sheet. @Lindsay_Stevens_Au is working on the `pyxform` implementation and we are hoping it will be available with or shortly after the [Collect v2026.1.0 release](https://forum.getodk.org/t/odk-collect-v2026-1-beta-real-time-geo-constraints-guidance-hints-shown-by-default-offline-entities-from-repeats/56920).

## Updated spec

The entities sheet MAY include multiple Entity declaration rows, provided that no two rows reference the same `list_name`.

If the entities sheet has more than one Entity declaration, then each `save_to` value on the survey sheet MUST be prefixed with a `list_name` followed by #, where the prefix matches a `list_name` in the entities sheet.

Example:  
`households#hhid`  
`participants#first_name`

The portion after # is the Entity property name. It is not valid to have `save_to`s with different list prefixes directly in the same group or repeat. See more in the [XForms spec](https://forum.getodk.org/t/odk-xforms-spec-proposal-create-and-update-entities-from-repeats/55164) and the [`pyxform` issue](https://github.com/XLSForm/pyxform/issues/800).

## Sample form

`entities` sheet for a form that creates Entities in the households and participants lists:

| list\_name | label |
| --- | --- |
| households | ${hhid} |
| participants | concat(${first\_name}, " ", ${last\_name}, "(", ${hhid}, ")") |

`survey` sheet:

| type | name | label | save\_to | calculation |
| --- | --- | --- | --- | --- |
| text | hhid | Household ID | households#hhid | |
| geopoint | hh\_location | Household location | households#geometry | |
| begin\_repeat | member | Member | | |
| text | first\_name | Member first name | participants#first\_name | |
| text | last\_name | Member last name | participants#last\_name | |
| calculate | member\_hh | | participants#hhid | ${hhid} |
| calculate | hh\_link | | participants#hh | ../../meta/entity/@id |
| calculate | member\_id | | | ../meta/entity/@id |
| end\_repeat | member | | | |

For now, we have decided not to do any automatic relationship discovery. We are starting design work on a way to state from Central that certain properties represent links between Entities and will share those proposals shortly. This will be important for performance.

We also intend to provide a way from XLSForm to more easily reference an Entity's id, likely something like `<list name>#__id` (`households#__id`) instead of `../meta/entity/@id` which will be even harder to write since `pyxform` will decide where to put the `meta/entity` block.

---

_[View the full topic](https://forum.getodk.org/t/create-and-update-entities-from-repeats/55163)._
