Associating a longitudinal form with an "entity type"

I think you probably mean instance id (or perhaps submission id?). The formid uniquely identifies the (generic) form used to capture/display the data. The entity data, in this case, constitutes a populated instance of that form, ie a 'submission'. Right?

[upon re-reading, I see you say entity type identifier (as opposed to just entity identifier). In which case yes, I think you probably could use the associated (entity) form formid to specify the type of entity]

In our implementation, we have "assets", ie the thing inspected, equivalent of your 'entities'. And we use a specific XForm form for the purpose of displaying this data - called an "asset form". Typically these asset forms are just simple flat forms that just have a bunch of 'questions' to display each of asset's field values. The asset data is display by populating the asset form with the appropriate instance XML instance (and making it read-only, [although you could potentially use the same mechanism for capturing new asset/entities...]. That is, the asset (aka entity) is basically represented as an existing 'submission' of the asset form (!)

This works great for us, as it allows us to use the exact same framework for displaying (capturing, updating) the asset data associated with an (inspection) form; basically its just another XForm displayed alongside the actual inspection (aka survey) form you are filling in.

It also means we can pull specific asset data out using the same XPath functions we use for regular forms (!) :slight_smile:

1 Like