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 |
Please see the answer to this other question and get back to us if it doesn't fix your issue. answered 29 Nov '18, 09:22 collectearth ♦ |
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. answered 01 Dec '18, 05:43 bsenterre |