I have two columns for field data collection which reference one another using when/then CASEs in the "Default Value" of the Attribute Form. The CASE converts one measurement to the other. This is because some field workers collect compass measurements in Strike/Dip while others use Dip/Dip Direction. This expression insures the "Strike" column receives a value, which controls symbolization. The first default value, for "Strike"

WHEN   "Dip_Direct"  < '90' THEN  "Dip_Direct" + '270'
WHEN  "Dip_Direct" >= '90' THEN  "Dip_Direct" - '90'

the second, for "Dip Direction"

WHEN   "Strike"  < '270' AND  "Dip" < '90' THEN  "Strike" + '90'
WHEN  "Strike" >= '270' AND  "Dip" < '90' THEN     "Strike" - '270'

This works well in QGIS, either column can be filled and the other is completed by the default expression however in QField, this locks one of the forms from editing. Only the Dip Direction field can be filled and saved.

I have attempted

  1. unchecking the 'Apply default value on update'
  2. adding IS/ IS NOT NULL values to the expression
  3. enabling Fast Editing Mode in QField

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.