Hello everybody
In my survey there are plots with informations existing trees. On these plots new trees should be added. These should be numbered automatically. How can I generate a consecutive numbering that follows the highest number of existing trees? For example: Existing trees have the number 1-10 and the first new tree should automatically receive the number 11.

Thanks for your advice

asked 28 Jan, 13:51

Sabrina's gravatar image

Sabrina
635
accept rate: 0%


Hi,

You have to write expression in "Default Value"

math:max(parent()/tree/tree_id)+1

where tree-is Entity

tree_id - is Number attribute

best regards

beka

permanent link

answered 28 Jan, 16:03

beka's gravatar image

beka
18110
accept rate: 6%

when I try this I get the following error message: [RPC Fault faultString="Circular dependency found in graph for node /inventur/plot/pb[2]/baumnr_neu"

permanent link

answered 28 Jan, 16:07

Sabrina's gravatar image

Sabrina
635
accept rate: 0%

can you tall me names of tree "Entity" and "Number attribute" from you survey?

permanent link

answered 28 Jan, 18:58

beka's gravatar image

beka
18110
accept rate: 6%

the "Entity" is pb and the "Number attribut" is baumnummer_neu

permanent link

answered 29 Jan, 08:38

Sabrina's gravatar image

Sabrina
635
accept rate: 0%

under baumnummer_neu, try this expression in "Default Value"

math:max(parent()/pb/baumnummer_neu)+1

permanent link

answered 29 Jan, 11:05

beka's gravatar image

beka
18110
accept rate: 6%

Unfortunately, that doesn't work. In collect the tree number is not adjusted and in collect mobile it crashes when I add a new tree.

permanent link

answered 29 Jan, 11:16

Sabrina's gravatar image

Sabrina
635
accept rate: 0%

see also picture example from our survey alt text

permanent link

answered 29 Jan, 11:18

beka's gravatar image

beka
18110
accept rate: 6%

I can't explain why it's not working. I do everything the way you do it. Maybe I can send you a screenshot?

permanent link

answered 29 Jan, 11:35

Sabrina's gravatar image

Sabrina
635
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×380

question asked: 28 Jan, 13:51

question was seen: 491 times

last updated: 29 Jan, 11:35