Open agseaton opened 7 months ago
@agseaton , have you tried with the latest QField 3.3 version? A couple of bugs were fixed with relations with cardinal configuration.
The QField project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.
Sorry for not getting back to you earlier on this.
I've tested it out with the example project provided above and QField 3.4, and I'm still seeing the issues I described.
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