---
title: "Automatically generated ID"
url: "https://openforis.support/questions/2273/automatically-generated-id"
tags: ["collect"]
status: "answered"
score: 0
answer_count: 1
asked: "2019-04-17T19:03:26"
last_activity: "2019-04-18T11:06:38"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Automatically generated ID

Asked by Sabrina on 2019-04-17

Hi everybody
In my survey there are existing trees and new trees. In the Schema I created a 1:N entity for the new trees. For all new trees an ID should be generated automatically. 
I tried it with "math:max(parent()/tree/tree_id) + 1". 
If I then try to add several trees (+ symbol) I get the error message "Circular dependency found in graph". How can I fix this error?
Is it possible that the ID of the new trees starts at 100 (101, 102...)? Can a calculated field no longer be used as key?
Thanks for your help,
Sabrina


## Answer (score 0, by Stefano (OF) on 2019-04-18)

Link: https://openforis.support/questions/2273/automatically-generated-id/2279

Hi Sabrina,  
please refer to the answer to [this other question][1].  
Many thanks,  
Open Foris Team


  [1]: http://www.openforis.org/support/questions/2246/how-to-create-an-auto-id/2277
