Start value for automatic numbering

  • Asked
  • Active
  • Viewed 3335 times
0

Hi OF Team
I would like to inquire about the automatic numbering of objects. See this forum post.

I want the automatic numbering of objects to start at 100 and to be set in steps of one: So 101, 102, 103...

With a default value of math:max((parent()/pb/treenumber)+100)+1 it did not work. (Where pb is the parent entity and treenumber a number attribute.

With a default value of math:max(parent()/pb/treenumber)+101 it does not work either. The series 101, 202, 303 is created.

How to write the correct max:math code?

Thanks for yiur support

1

Accepted answer

Dear Sabrina,
In your case you have to define 2 expressions:

  • in the first expression you should write math:max(parent()/pb/treenumber) + 1 and in Apply when specify count(parent()/pb) > 1
  • in the other one just write 101 in the Constant field.

Many thanks,
Open Foris Team

0

Accepted answer

Hi OF Team

Many thanks for your advice. Now it works perfectly!

Best regards

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.