3

I'm working on a QField project where I've defined 1:n relationships between points/polygons and tables. The relationship itself works fine, and the information is recorded in the tables as planned however the entries in the QField interface look unspecific - there are only rows with zeroes like shown the picture below.

How do I need to adjust the settings that the name of a specific field is shown in this field?

enter image description here


I tried different settings in the display properties without any changes in the appearance of this field.

2 Answers 2

1

You need to configure Display name in Display properties in Layer properties (https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/vector_properties.html#display-properties).

0
0

Facing the same problem, I came along the following solution:

As @BlackTesta stated, you need to configure Display Name in Display properties (https://docs.qgis.org/3.34/en/docs/user_manual/working_with_vector/vector_properties.html#display-properties)

The key function you need to use is relation_aggregate().

Since at least for me, the help-documentation didn’t provide an example for all the arguments I needed, I present you my expression:

relation_aggregate(    
relation:='name_of_relation',    
aggregate:='concatenate',    
expression:=concat("Field1",': ',"Field2" ),    
concatenator:='\n',    
order_by:=concat("Field1"+"Field3"))

In my example, the concatenator '\n' creates a new line for every related object (which you only see in QField, but not in QGis).

I was also happy to find out that one can even concat several fields for sorting the values (order_by).

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.