QField icon indicating copy to clipboard operation
QField copied to clipboard

Recalculate when repeat checkbox is checked

Open Ipickedausername opened this issue 2 years ago • 2 comments

Hello,

When 'repeat checkboxes' are checked, the fields still contain the same attributes. However, other fields depending on the checked ones aren't recalculated.

For example : [Case when "field 1" = 'X' then "field 2" = 'Y' Else "field 2" = 'Z']. If field 1 is repeated ("field 1" = 'X', but "field 2" becomes = 'Z' because QFIELD didn't verify the value of "field 1"). In this example, we could check the repeat checkboxes for the 2 fields ; but it doesn't work if the "field 2" is a concatenation between an "ID" (field 3) and "field 1".

QField version: [1.10.0 (1da006 v1.10/0)]

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: [Yes]

Ipickedausername avatar Jan 15 '22 13:01 Ipickedausername

Hello,

This is an important issue, because when "default values on update" or "expressions for visiblity" depends on the repeated field, nothing happens. The repeat checkbox loses some of its function.

Here is a video of what happens for "expressions for visiblity" when a container's visibility depends on a repeated field :

https://user-images.githubusercontent.com/72577399/150105769-0dc82518-07c8-465b-943b-2a62e97e46cc.mp4

The container "Hab" isn't shown when the field "COMPART" is already on "Habitat".

And a video when another field depends on a repeated field :

https://user-images.githubusercontent.com/72577399/150107290-090b761d-64e1-4b9f-94db-4c8dbd6d7924.mp4

The ID is supposed to be concatenated with 'the word Habitat', when the field "Habitat' is completed. But when the field "Habitat" is repeated, the ID stays a simple ID (uuid).

Thank you !

Have a good day !

Ipickedausername avatar Jan 19 '22 09:01 Ipickedausername

Hello,

I made few other tests on the last version of QGIS master-dev (b70957).

The issue has almost disappeared, but it still remain one problem.

If the visibility of a container depends from a repeated field, then the container doesn't appear the second time. But, if you leave the edited layer (by selecting another layer for example) and directly come back on your layer, then the visibility of the container is well calculated.

But still same issue with calculated field depending from a repeated field.

Plsease find attached a video to illustrate.

Thank you !

https://user-images.githubusercontent.com/72577399/153304819-7a52ff63-7aca-45b0-8be6-54c7e4498e3a.mp4

Ipickedausername avatar Feb 09 '22 22:02 Ipickedausername