---
title: "Error message when adding checks to a Text attribute"
url: "https://openforis.support/questions/2247/error-message-when-adding-checks-to-a-text-attribute"
tags: ["collect"]
status: "accepted"
score: 0
answer_count: 3
asked: "2019-04-09T11:00:44"
last_activity: "2019-05-06T10:19:58"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Error message when adding checks to a Text attribute

Asked by Sabrina on 2019-04-09

Hi
My survey contains a SamplingPointData file in which I want to check the species names. I tried idm:samplingPointData('baumart', vorgabe) where baumart= species name and vorgabe= name of the SamplingPointData file are. I chose "Pattern" as Check type. In the Preview an error message occurs that I should contact the system administrator. Which is the correct XPath expression to check the species name? Thanks for your support, Sabrina


## Accepted answer (score 1, by Lauri (OF) on 2019-05-06)

Link: https://openforis.support/questions/2247/error-message-when-adding-checks-to-a-text-attribute/2350

Dear Sabrina,

If you have only one species name in your Sampling Point Data per sampling unit (i.e. object of interest, even  tree) and the field to validate is a text field, you can try this:

    idm:samplingPointData('bauart', tree_id) = $this

But if you know your species in advance, you do not need to fill it in because then you can use a function (i.e. Calculated value expression) to automatically retrieve it. 

Regards, Lauri


## Answer (score 0, by Lauri (OF) on 2019-05-03)

Link: https://openforis.support/questions/2247/error-message-when-adding-checks-to-a-text-attribute/2339

Dear Sabrina,

Sampling Point data is basically meant to be a lookup list for sample ids and their attributes and not a flat lookup list. Please see Collect Manual and **11.4 SAMPLING POINT DATA** 

Instead of Sampling Point data, please use Species list and taxon data type in the survey.

Regards, Lauri


## Answer (score 0, by Sabrina on 2019-05-03)

Link: https://openforis.support/questions/2247/error-message-when-adding-checks-to-a-text-attribute/2342

Hi Lauri
Thanks for your answer. Of course I have read the manual but for me there are still some ambiguities.
I know that the Sampling Point Data is used to check existing values like DBH. The check worked for number attributes (e.g. azimuth). Since the tree species is also an attribute in the Sampling Point Data, it should be possible to check it, dont't you?
The error message occurs, when I use Code List to check the tree species. The error message appears even though I have selected the correct species name. When I *write* the species name there is no error message. Is a check only possible if the species name is written?
