---
title: "Filter values in dropdown list"
url: "https://openforis.support/questions/3486/filter-values-in-dropdown-list"
tags: ["collect", "collectmobile"]
status: "answered"
score: 1
answer_count: 2
asked: "2022-11-15T13:22:17"
last_activity: "2023-07-18T13:59:26"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Filter values in dropdown list

Asked by chris_1123 on 2022-11-15

Dear all,

we have a two-layered sampling design (->plot->tree) with multiple campaigns.

In a follow-up inventory we want to ensure that all trees from the previous campaign have been monitored. Thus we upload preset-data from the previous campaign.

Each campaign looks as follows:  
 - plot information  
 - tree information  
 - further measures  

To ensure that all trees from the previous inventory are monitored, I have the following idea:
 - include a checkbox 'tree_completed' as last item of tree information  
 - for tree->new inventory display a dropdown-list with all tree-ids (level2) from the previous campaign, filtered for those that are already monitored (i.e. tree_completed=true)
 - hide the 'further measures' until all trees from the previous inventory have been monitored 

Therefore, my questions are:
- how do I retrieve sampling point data for the second level key (note that tree_id corresponds to 'level2_code', idm:samplingPointData('level2_code',parent()/plot_id) doesn't seem to work) --> I assume that I could duplicate the level2_code column and name it distinctly in the preset-data?
- how do I filter this list for a given list/array of tree_ids for trees that have already been measured in the current inventory (tree_ids occur in the current survey and checkbox 'tree_completed'=true)?
- how do I implement this in the current inventory?

Thank you for your help,
Chris


## Answer (score 1, by luka on 2023-07-18)

Link: https://openforis.support/questions/3486/filter-values-in-dropdown-list/3707

Hi Chris,

did you get an answer to your question? I have the same problem with our data form and I would like to know how you solved it in the end.

Thanks,
Luka


## Answer (score 0, by Stefano (OF) on 2022-11-29)

Link: https://openforis.support/questions/3486/filter-values-in-dropdown-list/3498

Dear Chris,  
We will contact you to your private email address to better understand your request.  
Many thanks,  
Open Foris Team
