1

I've been trying to make a field mapping project using QField. I've developed attribute forms with drag and drop designer. I have 5 tabs so far. 1.Meta data 2. Lithology 3. Structure 4. Notes 5. Photos inside one of the tabs (Structure) I have two groups in 2 levels with conditional visibility .

  1. Planes/ lineation - second level
  2. Fold Type/ Fault type - Third level

enter image description here

fold types and Fault types with conditional visibility Fold type and Fault type

When I try them in QGIS it works well. In QGIS As intended, when I choose Foliation as the feature type the fold/ Fault groups wouldn't show in the forms. Third level groups only visible when I select Fold axis or Fault Group Fold Type will only show when the relevant feature "Fold axis" is selected. But when I try this in the mobile all goes haywire. Tab view Tab view The second level groups with conditional visibility works well, but everything beyond the 3rd level5groups with the conditional visibility shows up regardless of the Feature selected. So, Fold type/ fault type will show up no matter which feature I select.

This happens only with the 3rd level groups within a tab. The second level conditional visibility works well (Planes and Lineation)

Does anybody know how to resolve this?

3
  • Have you tried not nesting the groups, they're either visible or not - how do the 'levels' help with form layout?
    – Oisin
    Commented Jul 22, 2023 at 8:42
  • Another idea...if you have a level 2 group hidden, it is not visible in QGIS if Level1 is hidden regardless of the conditional visibility expression. If it shows in QField is tha because the level 2 Condition olis satisfied, so it shows even if Level1 is hidden. If so you need to refine your expressions.
    – Oisin
    Commented Jul 22, 2023 at 8:46
  • @Oisin Thank you for the reply. What do u mean by nesting? I used the word "level' to mean ..mmm..say how inside they are in a tab(Structure - Plane - Fold type). I could use a workaround, but this way is less messy when you collect data from the field... And the fields are not hidden, at any level..
    – MithiJ
    Commented Jul 24, 2023 at 1:44

1 Answer 1

1

I have now tested this and there is a difference in behaviour between QGIS and QField.

In QGIS, if a TAB is hidden, all other Containers (tabs, groups, rows) on that TAB are also hidden, regardless of their own conditional visibility expression.

In QFIELD, TABS and other containers on a hidden TAB are displayed unless their conditional visibility also equates to FALSE or 0.

In your example, TAB "Fault type" is on 'level 3', and is set to visible when "Feature"='FLT' - which is on a level 1 TAB "Structure". You do not state the visibility expression for the level 2 TAB "Planes" . But I suspect the issue is occurring because there are cases when the visiblility expression for TAB "Fault Type" is satisfied, i.e. "Feature"='FLT', but the visiblility expression for TAB "Planes" is not.

You should be able to solve this by adding the visiblility expression for TAB "Planes" to the visiblility expression for TAB "Fault type" with an 'AND' operator between them.

3
  • I think this must be the issue. I'm gonna try this and update you. Thank you so much.
    – MithiJ
    Commented Jul 26, 2023 at 3:07
  • Hi @Oisin! sorry for taking long time.. But it didn't work! visibility expression I have in the Fault/fold type TAB is already in the "planes" TAB as a part of the visibility expression there. Can't figure out how they act together..
    – MithiJ
    Commented Aug 2, 2023 at 4:42
  • Can you post the visibility expressions and, data types and constraints of all attributes referred to.
    – Oisin
    Commented Aug 2, 2023 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.