Default expression constraint ceases suddenly to update #4593
Unanswered
edouardKoda
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
For one field of one of my layers in my qfield cloud project, i have a default expression in place which calculates a unique code simply by adding +1 to the last number of the previous entry's code. Here is the whole expression for context:
concat( "categorie" , '-', @username_init, '-', count( 'survey_catalog_de5e7706_7b39_4665_978f_28a022c2aff0' , group_by:="categorie", filter:="categorie" = attributes(@feature)['categorie'] )+1)
This expression seems to be working just fine until suddenly, and totally randomly, it doesn't, meaning that it ceases to add +1 to the latest entry. This can happen after 2, 5, 10, whatever number of entities created. In other words, when this problem happens, the code generated by this expression is simply the same one as the previous entry created, thus not respecting the unique constraint that i have applied on this field.
This problem can not be replicated in QGIS. It only happens when using Qfield.
Anything I can do to help?
Beta Was this translation helpful? Give feedback.
All reactions