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"
CASE
WHEN "Dip_Direct" < '90' THEN "Dip_Direct" + '270'
WHEN "Dip_Direct" >= '90' THEN "Dip_Direct" - '90'
END
the second, for "Dip Direction"
CASE
WHEN "Strike" < '270' AND "Dip" < '90' THEN "Strike" + '90'
WHEN "Strike" >= '270' AND "Dip" < '90' THEN "Strike" - '270'
END
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
- unchecking the 'Apply default value on update'
- adding IS/ IS NOT NULL values to the expression
- enabling Fast Editing Mode in QField