Can I check the next to last item in a list of items?

  • Asked
  • Active
  • Viewed 9509 times
0

Hi!

I would like to check some of the attributes of the next to last item of a list of items, e.g. recorded trees. How do I do that?

Thanks!

0

Accepted answer

Suppose that you have a calculated attribute tree_num inside the "tree" entity using this expression: idm:position(); then you can select the trees from next to last item with an expression similar to this (valid for attributes defined inside the "tree" entity): parent()/tree[tree_num > $this/parent()/tree_num]. The expression $this/parent()/tree_num is used to reference the tree_num of the tree into which the attribute is defined. Thanks.

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.