I am now saving photos in external storage, with photo-naming (available in QGIS3.14). I am not sure what was wrong before, but the external folder must be the Qfield folder on external storage , i.e. sd card/android/data/ch.opengis.qfield/files/ or its subfolders.
okay, with much playing around, this is now working:
when "fkid" is null then
So, I've found the cause of the issue: [Project properties]_[Project Home] must be blank.
No need to set the 'Referencing Field' (aka foreign key, i.e. fkid in my example) to a Relation reference.
I have Relation set to 'Association' strength - I have not tested 'Composition' strength.