# Attribute field "is in" filter constraint

**URL:** https://community.qfield.org/t/attribute-field-is-in-filter-constraint/636
**Category:** Ask the Community
**Tags:** gh-import
**Created:** [14 May 2025 02:42 UTC](https://community.qfield.org/t/attribute-field-is-in-filter-constraint/636 "2025-05-14T02:42:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://europe1.discourse-cdn.com/flex018/uploads/qfield/original/1X/7d3726da0ef5099a1e135505c03d2f125d527aae.png) [@system](https://community.qfield.org/u/system)
#### Post date: [14 May 2025 02:42 UTC](https://community.qfield.org/t/attribute-field-is-in-filter-constraint/636/1 "2025-05-14T02:42:47Z")

</div>

Hello there folks.  
I’ve been trying to adapt a desktop QGIS data entry project for QField, but I’ve noticed an issue that, while not critical, can be a bit annoying. It relates to the “Filter expression” option that is available in QGIS for relation references.  
The way our database is set up is that attribute fields are tied to look up tables for their values, but sometimes those tables contain extra data that isn’t valid for some attributes, but is for others.  
So, for example, in the “status” table, you’d have stuff like “1-functional, 2-non-functional, 3-flooded, 4-broken lid, 5-no power, etc etc etc”. The “is it working” attribute needs just positions 1 and 2 in the table, while the “why doesn’t it work” attribute needs 3-5.  
In QGIS, the relation reference between the feature table and the look up table is filtered with the “is in (1,2)” and “is not in ()” expression.  
That Filter Expression does not seem to be functional in QField the way that it’s currently set up.

Is there a way I can still have the “is in” filter expression functional, or something similar, in QField as it is in QGIS?

Later Edit: So, as it turns out, changing the Relation Reference to a Value Relation solves the issue. It’s just going to take some time to change all of it.

* * *

_Imported from [GitHub discussion](https://github.com/opengisch/qfield/discussions/4279) by @unacomn on 2023-05-11T11:14:46Z_
