You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QField seems to handle casting of UUIDs to string differently than QGIS, with the result being inconsistent data whether it is digitized on mobile or on desktop.
QGIS casts UUID types to its pure hex representation (e.g. '9ec9a230-4866-4e45-ab59-b8610b02711f') whereas it is cast to brackets in QField (e.g. '{9ec9a230-4866-4e45-ab59-b8610b02711f}').
Reproduction steps
Steps to reproduce the behavior:
For a layer, make an uuid autogenerated field (form field uneditable, default uuid() )
Make a virtual field with expression left(to_string("uuid"),4).
Digitize a new entry on desktop, with automatic uuid. Virtual field shows: 9ec9.
Digitize a new entry on mobile, with automatic uuid. Virtual field shows: {9ec.
Expected behavior
QField represents uuid as '{xxx}' whereas QGIS represents uuid as 'xxx'. I would expect it to be consistent, preferably 'xxx'.
Screenshots and GIFs
Showing entries on QField, we can see which ones were digitized previously on desktop, and which one in mobile session.
QGIS (please complete the following information)
OS: Linux
QGIS Version 3.36.1
QFieldSync Version 4.11.10
QField (please complete the following information)
Device: Pixel 6a
OS: Android 14
QField version: 3.4.5
Additional information
Problem started happening recently, didn't happen in an older version of QField: No
Problem can be reliably reproduced, doesn't happen randomly: Yes
Problem happens with all files and projects, not only some files or projects: so far Yes
The text was updated successfully, but these errors were encountered:
@antoineouellet , uuid() format varies across platforms (e.g. on Windows you won't have the {} by default whereas on Linux and Android they are present).
The solution is to explicitly asks for generated uuids without braces through the following function parameter: uuid('WithoutBraces').
Describe the issue
QField seems to handle casting of UUIDs to string differently than QGIS, with the result being inconsistent data whether it is digitized on mobile or on desktop.
QGIS casts UUID types to its pure hex representation (e.g. '9ec9a230-4866-4e45-ab59-b8610b02711f') whereas it is cast to brackets in QField (e.g. '{9ec9a230-4866-4e45-ab59-b8610b02711f}').
Reproduction steps
Steps to reproduce the behavior:
left(to_string("uuid"),4)
.Expected behavior
QField represents uuid as '{xxx}' whereas QGIS represents uuid as 'xxx'. I would expect it to be consistent, preferably 'xxx'.
Screenshots and GIFs
Showing entries on QField, we can see which ones were digitized previously on desktop, and which one in mobile session.
QGIS (please complete the following information)
QField (please complete the following information)
Additional information
The text was updated successfully, but these errors were encountered: