-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The problem of a unique human-readable id vs UUID #636
Comments
Hello, is there a better place to write this kind of problem? Fabien |
Hi @fguerra06, sorry for the late reply. It seems the retrieved information is the ID of the foreign key. As a suggestion for the
|
The QFieldSync project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. |
Hello, thank you for the answer. Sorry to to the late response. I'll try it. For the moment I solved the problem by using a simple join in the layer properties dialog. It's working well without adding a new field in the postgis database. Thank you again Fabien |
Hello,
I'm dealing with a problem of articulation between UUIDs and human-readable identifiers.
Sorry for the long message but I'll try to be clear...
I have two postgis tables: « polygon » and « points ». Points can be children of polygons.
In Postgis as in Qfieldsynch, the primary key of both tables are uuids. Here is an example with the polygon table:
Each polygon has a type and a number, the combination of them must be unique. This is my auto-calculated and human readable “type_num” field.
In the “points” table, the “fk_polyg” field is a relation reference widget. The display expression is the “type_num” field in the polygon table.
The “id_pol_pt” field is auto-calculated using the “represent value” function. It is my unique human-readable point identifier. It concatenates “fk_polyg” which is supposed to be the display expression “type_num”, the type of point and the point number. « type_num » is itself the result of automatic concatenation in polygon table.
Point labels and display names are based on the « id_pol_pt » field.
When I add a point directly in Qgis, everything works fine. I can see my human-readable identifier.
After exportation, this identifier is recognized by Qfield and all goes well when I add a new point in Qfield. I can see my human-readable field.
The problem occurs when Qfield and Qgis synchronize. QGIS is unable to find the “type_num” component of the polygon. It writes the uuid instead.
I get the following error about the RepresentValue() fonction.
"2025-02-06T15:14:23 WARNING Layer point, field fk_polyg: representValue() with inconsistent layer parameter w.r.t relation referencingLayer"
Is there something wrong with my approach?
Thank you.
Fabien
The text was updated successfully, but these errors were encountered: