---
title: "Using a variable in path to a node"
url: "https://openforis.support/questions/1314/using-a-variable-in-path-to-a-node"
tags: ["collect"]
status: "accepted"
score: 0
answer_count: 1
asked: "2017-06-27T12:26:51"
last_activity: "2017-06-28T10:04:16"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Using a variable in path to a node

Asked by Andras on 2017-06-27

Hi,

Is it possible to use a value stored in a node to define the path to another?

E.g.: I have a tree entity with an attribute "stand_number" (=1) (/plot/trees/stand_number (trees is a multiple entity)).

Can I use the value stored in "stand_number" to access /plot/dgm/dgm1m by substituting 1 in /plot/dgm/dgm1m?
dgm1m is the basal area weighted mean diameter on stand 1.

The idea is to get the tree which is closest to dgm.

Thanks!


## Accepted answer (score 0, by Stefano (OF) on 2017-06-28)

Link: https://openforis.support/questions/1314/using-a-variable-in-path-to-a-node/1315

Hi András,  
There isn't any way to generate a path dynamically like you are asking.  
However you can use the `stand_number` inside the `Apply when` condition and use different variables in the `Expression` field. I hope this will help you.  
Thanks,  
Open Foris Team
