---
title: "Reference an attribute for min-count"
url: "https://openforis.support/questions/3527/reference-an-attribute-for-min-count"
tags: ["collect"]
status: "answered"
score: 0
answer_count: 1
asked: "2023-01-13T19:57:06"
last_activity: "2023-01-13T23:14:29"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Reference an attribute for min-count

Asked by bryant on 2023-01-13

Hello OF Team,

I have a "trees" table nested within "plot". Using a hierarchical code list, I populate a value for the number of trees that exist at a plot (plot/n_trees with parent code plot/plot_id). I would like to use this value to define a function for the "Min Count" field in the "trees" table. I have tried simply "plot/n_trees" without success. How does one reference a code value and use it as an integer at a different node in the survey?

Thank you!

Bryant


## Answer (score 0, by Stefano (OF) on 2023-01-13)

Link: https://openforis.support/questions/3527/reference-an-attribute-for-min-count/3529

Dear Bryant,  
If n_trees contains a number and it's defined as a numeric attribute, marked as calculated, it should be sufficient to use the attribute name in the expression, or try to use the function `number(n_trees)` to cast the value into a number.  
Many thanks,  
Open Foris Team
