expression: getting attribute value from the previous tree

  • Asked
  • Active
  • Viewed 4269 times
1
1

Hello,

I have 'tree' entity and I want to get for the (code) attribute 'tree_segment' by default the same value that was given to the previous tree, starting from tree no 2. What's the correct expression?

BR Lauri

1

Accepted answer

Hi Lauri,
You can access the previous tree information in this way:

parent()/tree[idm:position($this/parent()) - 1]/tree_segment

Don't forget to specify the condition, that must be:

idm:position($this/parent()) > 1

Thanks.
Open Foris Team

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.