How can I automatically enumerate items of a list?

  • Asked
  • Active
  • Viewed 7202 times
0

Hi there, I would like to enumerate list items in my survey form automatically (e.g. trees recorded on a sample plot). How should I go about it? And what happens when an item is removed from the list? Can the items affected re-enumerated?

Thanks!

0

Accepted answer

Hi, If the items that you want to enumerate are entities, like for example a table of trees, you can simply enable the option "Show row number in tables" in the entity editor in Collect Survey Designer: the number of each row will be automatically shown in the data entry form. If you need to do something more complex and you want to use that number in other expressions, you can define a calculated attribute like "tree_num" for example and you can define this expression as Default Value expression: "idm:position()". The result will be very similar to the previous solution. You can try both the solutions and see how the data entry form appears using the "Preview". Thanks

Thanks for the answer! How about removing an item from the list and re-enumerating?

Andras Andras

The re-enumeration is automatic if you use the first solution. If you use the second one, the re-enumeration will be automatic in the next release of Collect (3.3.2). Thanks!

Stefano (OF) Stefano (OF) ♦♦

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.