You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behaviour in QField of many to many fields is not consistent with that in QGIS.
In the QGIS attribute form configuration, a many-to-many field can be configured to allow the user to add, delete, link, or unlink items in the target table.
However, the link and unlink options don't work in QField -- the field is blank and can't be edited.
Additionally, while the add and delete options work in QField, and they actually function as 'link' and 'unlink' do in QGIS, i.e. they don't actually allow creation and deletion of rows in the target table.
Reproduction steps
Set up two tables and a join table
Configure QGIS relations for a many-to-many relationship between the two tables
Set up attribute form for the relation with either 'link' and 'unlink' selected, or 'add' and 'delete'.
Export to QField
Test form in QField.
Expected behavior
If link and unlink are selected:
Form should allow linking/unlinking an existing child feature, as shown in QGIS:
If add and delete are selected:
Form should allow adding new features/deleting existing ones from the child table, again demonstrated in QGIS:
Observed behavior
If link and unlink are selected:
QField widget doesn't do anything
If add and delete are selected:
QField widget is functional, but actually just allows linking and unlinking, not adding and deleting:
Note here also that QField displays the attributes form for the join table, whereas QGIS bypasses that entirely (which is the desired behaviour).
Describe the issue
The behaviour in QField of many to many fields is not consistent with that in QGIS.
In the QGIS attribute form configuration, a many-to-many field can be configured to allow the user to add, delete, link, or unlink items in the target table.
However, the link and unlink options don't work in QField -- the field is blank and can't be edited.
Additionally, while the add and delete options work in QField, and they actually function as 'link' and 'unlink' do in QGIS, i.e. they don't actually allow creation and deletion of rows in the target table.
Reproduction steps
Expected behavior
If link and unlink are selected:
Form should allow linking/unlinking an existing child feature, as shown in QGIS:
If add and delete are selected:
Form should allow adding new features/deleting existing ones from the child table, again demonstrated in QGIS:
Observed behavior
If link and unlink are selected:
QField widget doesn't do anything
If add and delete are selected:
QField widget is functional, but actually just allows linking and unlinking, not adding and deleting:
Note here also that QField displays the attributes form for the join table, whereas QGIS bypasses that entirely (which is the desired behaviour).
Sample project file & database
m2m.zip
Desktop (please complete the following information)
Mobile (please complete the following information)
Additional information
The text was updated successfully, but these errors were encountered: