Replies: 2 comments 3 replies
-
@Benwaa74 , can you make a reduce sample project and add it to this discussion ( github supports zipped attachments in comments). |
Beta Was this translation helpful? Give feedback.
3 replies
-
FYI... I am using the latest version of each software component: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I have recently come back to using QField after a long break. Looks like a lot has changed and it is a much improved app. Great work to all the team!
I have been updating an old project and making it more useful and flexible for my needs. This includes making the attribute form more useable but also more complex. I want to use the project for field work (I am a land surveyor). It uses field codes and various options associated with those codes.
One of the things I have implemented is controlling the visibility of various elements based on expressions. These expressions utilise joins I have created to various tables within the QGIS project. Previously I had these expressions setup to use 'hard-coded' values. Now they are using values derived from the tables based on user-selected form options.
It is working well in QGIS itself but I cannot get this to work in QField (either locally or via QField Cloud) at all, without reverting back to the hard-coded values. I am using iOS, but I suspect it would be the same on Android - though I could be wrong! It is a bit frustrating (and perhaps I should have done some more testing before proceeding too far down this path?!), but if someone could help me out it would be much appreciated. I'm sure the methodology I've used may not be the best approach, but as it worked well in QGIS I assumed it would also work in QField.
For example, the user digitises a point then selects the appropriate field code. Different tabs become visible based on the code selected. The user fills in the form fields on each tab (some mandatory, some optional).
Have provided a couple of screenshots to help demonstrate the issue:
Initial form:
Different code selected - shows different tabs:
Joins:
Visibility control for 'General' tab:
"CodeOptions_CodeSystem" = "CodeSystem" and "CodeOptions_Code" = "Code" and "CodeOptions_Owner" = true or "CodeOptions_CodeSystem" = "CodeSystem" and "CodeOptions_Code" = "Code" and "CodeOptions_Material" = true or "CodeOptions_CodeSystem" = "CodeSystem" and "CodeOptions_Code" = "Code" and "CodeOptions_PoleDetails" = true or "CodeOptions_CodeSystem" = "CodeSystem" and "CodeOptions_Code" = "Code" and "CodeOptions_Fences" = true or "CodeOptions_CodeSystem" = "CodeSystem" and "CodeOptions_Code" = "Code" and "CodeOptions_SubTypes" = true or "CodeOptions_CodeSystem" = "CodeSystem" and "CodeOptions_Code" = "Code" and "CodeOptions_Signage" = true or "CodeOptions_CodeSystem" = "CodeSystem" and "CodeOptions_Code" = "Code" and "CodeOptions_RetWall" = true or "CodeOptions_CodeSystem" = "CodeSystem" and "CodeOptions_Code" = "Code" and "CodeOptions_QQ" = true
Happy to share the whole project as it is difficult to explain in detail here - if someone can tell me how to do that here (or elsewhere).
Thanks,
Ben
Beta Was this translation helpful? Give feedback.
All reactions