2

After programming in QGIS, the following error appears in the QField when I try to make a picture:

Cannot add child feature: parent primary keys are not available.

It's probably just a minor flaw in relationships or something like that. I just don't find it.

How can I do this?

0

2 Answers 2

1

I have created a 1:n relation (Bäume to Bäume_Bilder). Each feature in Bäume can have unlimited pictures. Check my relation options:

enter image description here

In the Layer properties of Bäume_Bilder you have to set the field "ID" (the referencing field of "Bäume_Bilder" to Widget Type: Relation Reference like shown:

enter image description here

1

The error message is telling you the issue. Whatever field you use as the primary key, has no value. If this occurs when you try to add photos to existing features, its because you have not populated the field. If its for new features, you've forgotten to set the default value (something like uuid() or a sequence).

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.