-
-
Notifications
You must be signed in to change notification settings - Fork 283
Description
What is the bug or the crash? What were your expectations and what actually happened?
In a situation where I have 2 layers with a 1:n composition relation based on the UUID of the parent layer, I will usually create new feature for the child layer from within the designated relation editor I configured in the form of the parent layer. This works as expected.
The thing is sometimes, I would like to create new features directly from the form of the child layer manually linking to the necessary ID of the parent layer (using the ID field in the child layer configured as a value relation pointing to the ID field in the parent layer). Note that my ID fields are identically configured in the parent and child layer with the same name, formatted as string and of length 36.
The problem is that when doing so, QField does not accept the value for the ID in the child layer eventhough it is selected from the value relation dropdown/completer. In QGIS, it works as expected, no issue.
ID_same_as_parent_20251125_181856.mp4
Upon further testing, I figured that if I configured the parent ID field in the child layer of a length of 40, it now works. Weirdly the uuid does not seems to be saved any differently either if I create the feature in the child layer from the relation editor or its own form. From other observations, I would guess it might have to do with the brackets sometimes visibles arround uuid (ex. {80d8212f-d8be-47a7-a59a-db46ea092daa}).
ID_adjust_string_40_20251125_181649.mp4
So my expectation would be for it to work when the field are configured identically both in the parent and child layer as observed in QGIS.
QGIS version: 3.40.8-Bratislava
Here's a sample project :
Sample_project.zip
Steps to reproduce the issue
Explained in the bug description.
Version
3.7.9 - Haida Gwaii
Operating system name
Android
Operating system version
Android 15
Reinstall QField
- I have a fresh install of the latest QField version, but the problem persists.
- Problem can be reliably reproduced, doesn't happen randomly.
- Problem happens with all files and projects, not only some files or projects.
Additional context
No response