---
title: "How to express \"does not contain\" for a multiple choice field?"
url: "https://openforis.support/questions/1438/how-to-express-does-not-contain-for-a-multiple-choice-field"
tags: ["collect"]
status: "answered"
score: 0
answer_count: 1
asked: "2017-11-11T09:39:47"
last_activity: "2017-11-20T06:35:17"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# How to express "does not contain" for a multiple choice field?

Asked by flandsberg on 2017-11-11

Hi,

I want to make a warning message based on a code field with multiple answers possible. I want to identify when "lane" is not included in the combination of answers (users can select multiple answers).

"!=" does not work.

Any other syntax I can try?

Thanks,

Floerence


## Answer (score 0, by Stefano (OF) on 2017-11-19)

Link: https://openforis.support/questions/1438/how-to-express-does-not-contain-for-a-multiple-choice-field/1463

Hi Florence,  
Since version 3.14 of Collect you have the possibility to use an XPath function for this, `idm:contains(MULTIPLE_ATTRIBUTE_NAME, 'value')`. It returns true when a specified 'value' is among the selected ones of a multiple attribute.  
Thanks,  
Open Foris Team

> Fantastic addition! As always, many thanks! Florence (flandsberg)
