1

I have set up a project in QGIS with default expressions which takes data from other fields previously filled in and automatically generates a value. It works fine when filling a form into QGIS but it doesn't work while filling a form into QFIELD. Does anyone knows why and how can i fix it?

2
  • 1
    Can you be so kind and describe this point " it doesn't work ..." more in details? Like what kind of error do you get, your expected result, your efforts and ideas etc.
    – Taras
    Nov 23, 2020 at 8:23
  • Imagine i am filling a form with 3 fields and the third one is the sume of the first and the second, then i set a default expresion for the third field into the attribute form in QGIS, thus, after insterting the first and the second number i click the box to insert the third one and automatically generates the sume. Well, whenever i try to do the same thing in QFIELD using the same project, i insert the first and the second number and then i click on the third box and nothing happens. I have to do it manually as the default expresion doesnt work and nothing is automatically generated.
    – Serggg182
    Nov 23, 2020 at 9:28

2 Answers 2

1

Applying default values on update in "real-time" like we have it in QGIS is not (yet) supported in QField.

But a generally used workaround for this case is QField's fast editing mode. It saves changes immediately and updates the other fields. And this leads to the behavior you are looking for.

enter image description here

Update: In QField version 2.x.x live update will be supported. Check it out on the current Beta version.

1
  • I don't want to raise a new issue on the tracker yet (still trying things out), but this seems to be non-functional for me in 4.2.2. Is there any reported issue for other people trying to have default values applied in real-time according to expressions referencing other fields in the layer?
    – Gabriel
    Oct 25, 2022 at 18:26
0

This may help: When creating the form, fill out the expression for the summed field using current_value() to pull the values from each of the prior fields to create the new summed value.

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.