Automatic synchronisation QField -> QFieldCloud -> PostgreSQL "Offline editing" project

Hi

We are currently preparing a QField project for a field inspection campaign. We have a self-hosted version of QFieldCloud that is functional but outdated (one year old). We are not updating it due to a lack of expertise and also because it works…

The project is based on a PostgreSQL parent table containing the geographical entities to be checked and a non-spatial child table containing the checks (1→M).

We have set up this project in ‘Offline editing’ mode. At this stage, everything is working: entering a check in the child table → synchronisation to QFieldCloud then PostgreSQL.

The problem is that upstream synchronisation is either manual or delayed on the QField side to 30 minutes. As for downstream synchronisation, it also seems to be manual. As a result, when an object is added, it appears locally but the fields calculated by the trigger are not visible even when there is a network connection.

In fact, as soon as a project is set to ‘Offline editing’ mode, it is no longer able to connect directly to the database when a connection is available.

Is this behaviour normal, or is there a setting that we have not adjusted that would allow automatic synchronisation as soon as a connection is available? At the very least, can the delay be changed (we saw a screenshot in which this seemed to be configurable on the QGIS side)? More broadly, can you explain the logic behind this? We will need to explain this clearly to users.

Thank you

Hi,

According to the docs offline editing mode does not allow for anything but manual or delayed synchronisation. Also in offline editing mode, advanced postgis operations are not available.

It also says you can change the delay for the auto-push setting: Advanced Setup - QField Ecosystem Documentation
However, that setting seems to be missing in the latest version of QFieldSync. I have seen it in version 4.14, but I don’t know when this got removed.

HI @SIG-SDIS30
You can alternatively just set the relation in QGIS directly. And then be sure to create a UUID between the parent and child. Have a look here: Relation Reference Widget - QField Ecosystem Documentation