---
title: "obtain the value of an attribute from a multiple entity to use it in another multiple entity"
url: "https://openforis.support/questions/2024/obtain-the-value-of-an-attribute-from-a-multiple-entity-to-use-it-in-another-multiple-entity"
tags: ["collect"]
status: "answered"
score: 0
answer_count: 1
asked: "2018-11-25T20:06:41"
last_activity: "2018-11-27T22:45:27"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# obtain the value of an attribute from a multiple entity to use it in another multiple entity

Asked by lcomas on 2018-11-25

Hello OF team,

I have a multiple entity table with an taxon and dbh attributes. The dbh is calculated as the height value of the tallest tree in the forest, multiplicated by 3 (dbhh = ht*3). I want to use this dbh value for as a check rule value in the dbh mesure of trees in a plot. How can i refer the dbh value from another entity for each especie?

Thanks!!

Lluís


## Answer (score 0, by Stefano (OF) on 2018-11-27)

Link: https://openforis.support/questions/2024/obtain-the-value-of-an-attribute-from-a-multiple-entity-to-use-it-in-another-multiple-entity/2027

Hi Lluís,  
If I understand correctly your question, this is the structure of your survey: you have an entity `tree` with attributes `species` and `height` and another entity `tree_2` with an attribute `species_2`.  
To simplify your calculations you can add a calculated attribute in tree_2 to store the value of the tallest tree with the same species specified in each row of tree_2 (call this attribute `ht`): the expression to write in the Calculated value is: `math:max(parent()/tree[species = $context/species_2]/height)`.  
Then you can define another calculated attribute `dbhh` with an expression like this: `ht * 3`.  
In the end you can use the value of `dbhh` in a comparison check inside your dbh attribute of the tree_2 entity.  
Does it fits your needs?  
Many thanks,  
Open Foris Team
