# Sample attributes disappear when taking a picture (only when relation is used)

**URL:** https://community.qfield.org/t/sample-attributes-disappear-when-taking-a-picture-only-when-relation-is-used/640
**Category:** Ask the Community
**Tags:** gh-import
**Created:** [14 May 2025 02:43 UTC](https://community.qfield.org/t/sample-attributes-disappear-when-taking-a-picture-only-when-relation-is-used/640 "2025-05-14T02:43:07Z")
**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:43 UTC](https://community.qfield.org/t/sample-attributes-disappear-when-taking-a-picture-only-when-relation-is-used/640/1 "2025-05-14T02:43:07Z")

</div>

I have created a QField project for a sampling trip and created a relation so I could take multiple pictures per sample point, but each time I take a picture, the data I used on sample attributes, which are from a value map widget and have an enforced null constraint, the fields just get blank, and I have to fill the fields again, so I could take a new picture.

I know I could create multiple fields, like Photo 1, and Photo 2, Photo N group them under a Picture tab, and be done with it, but it really bothers me that I can’t make it the intended way. Did anyone else encounter this behavior? Do you have any idea what might it be related to?

* * *

_Imported from [GitHub discussion](https://github.com/opengisch/qfield/discussions/4267) by @UsulPaul on 2023-05-05T16:17:15Z_
