---
title: "Get Sample Point Data based on one key attribute"
url: "https://openforis.support/questions/2085/get-sample-point-data-based-on-one-key-attribute"
tags: ["collect"]
status: "accepted"
score: 0
answer_count: 1
asked: "2019-01-07T13:58:23"
last_activity: "2019-01-08T13:45:16"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Get Sample Point Data based on one key attribute

Asked by Andras on 2019-01-07

Dear OF Team,

I have noticed that it is not possible to retrieve information from SPD based on just one key attribute resulting in a set of values.

The reason I am asking for this is to be able to retrieve whether a cluster is permanent or not. For that I would like to be able to use

`idm:samplingPointData('psp',id)[1] = "yes"`

Where id is the cluster ID. I have 3 plots in a cluster, hence the subsetting [1].

Thanks for your help!

Andras


## Accepted answer (score 1, by Stefano (OF) on 2019-01-08)

Link: https://openforis.support/questions/2085/get-sample-point-data-based-on-one-key-attribute/2090

Hi Andras, 
The expression should be idm:samplingPointData('psp', id, 1) = "yes"
The second argument is the cluster ID, the third argument is the plot ID.  
Let us know, thanks.  
Open Foris Team

> Believe it or not, I just thought of it this morning :) Thanks a lot! (Andras)
