Missing _id in the GeoJson data export

I’m building a web map by fetching the data as geojson format from the api. However I do not see the _id or the uuid as properties which is important for me to had some reference by adding more information on a feature when clicked.
On the normal api data export, the _id, _uuid, version, etc. show.
Can someone help me to add the _id to the geojson output or a way to have it in each form submission?

_id and _uuid are metadata and the latter you can reference in your form e.g. to copy them into another variable (using a calculation).

1 Like

Thanks @wroos. Would you please show me how to copy it in another variabke using a calculation?

You can reference the _uuid value as:

  • ${instanceID}
  • /data/meta/instanceID.

So, you can create a variable as calculate type (or as string) with one of these expressions as calculation.

Sorry, I didn’t find the way to get/reference the _id value. @Kal_Lam, @Josh, @jnm or @ks_1 might help here, please. _id is probably not available before submission?

“It is literally the primary key of a relational database table.” See Submission duplication after version 2.023.2 - #13 by jnm.

This post (2021) says

`KoBoCAT REST API.json includes the unique _id.
Submission id column missing from API V1 requests - #5 by jnm

Hi @wroos. Thanks for your help.

I inserted for type; calculate, name: unique_uuid, label: unique_uuid and calculation column as ${instanceID}. But after submitting a test form and visualizing the api data, unique_uuid is not there. Am I missing something?

Can you see it
- in the table view
- in modal view
- in the XLS download?

In the table view, modal view likewise the XLS download, it’s empty.

@wroos Hello. I have just submitted a new form and it seems now to work. I can now see the uuid under my unique_uuid variable based on the instanceID. I don’t know why it didn’t work previously, however much thanks for your help.

Please, also test it with editing/save after submission. As far as I know, the _uuid will change then. (The _id won’t.)

There have also been some rare cases where a duplicate _uuid happened. See previous discussion in the forum.

The question how to get/reference the _id is still open, please. @Kal_Lam and the core team might help, please?

Yes it changes. Problem not yet fixed!

You could stop recalculation using once(), but you will reference then always the first version of any edits.

1 Like