Dear all, I would like an attribute "id" in the root of my survey where the value is set to the last entered value + 1. In a non-root entity, I can do that using math:parent()/tree/id + 1 But in the root I cannot make reference to parent()/ and therefore I cannot make this work. Any help will be very much appreciated. Bruno

asked 29 Nov '18, 04:59

bsenterre's gravatar image

accept rate: 0%

Please see the answer to this other question and get back to us if it doesn't fix your issue.

permanent link

answered 29 Nov '18, 09:22

collectearth's gravatar image

collectearth ♦
accept rate: 16%

Thank you for this! I understand but I would still see some clear interest in having the option of an auto-incremented attribute. It would be unique if if simply I add an attribute with a short alphanumeric code identifyng the device used. Therefore I could have my entries labelled more easily S40-156, S40-157, etc. (in place of the concatenation I have to do now without auto numbered index: S40-20181128-1632, using device+date+time). I also have the issue with a child entity: e.g. I have 'specimens' as a child entity to 'plot', 'plot' being child to 'exploration event'. In 'specimen' I have to use a continued numbering and I would like the system to search for the maximum value entered in all specimens of all plots and all exploration events. Thanks a lot for your help.

permanent link

answered 01 Dec '18, 05:43

bsenterre's gravatar image

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 29 Nov '18, 04:59

question was seen: 204 times

last updated: 01 Dec '18, 05:43