QField icon indicating copy to clipboard operation
QField copied to clipboard

Filters in Relation Reference

Open xyago opened this issue 7 years ago • 9 comments

I activate filters in Relation Reference widget don´t show in QGIS.

I don´t know if this is an issue or is not implemented yet.

Is there any other option that can do something similar?

Thank you!

xyago avatar May 16 '18 16:05 xyago

When you say QGIS, you mean QGIS not QField yes?

Anyway especially when using the qfieldsync-Plugin filters should not be used. It screws up the synchronising. But you can use rule-based rendering and "hide" (i.e. don't render) the features you don't want to see.

saemiw avatar May 16 '18 19:05 saemiw

I mean about the filters in the Relation Reference widget in QGIS, which let you filter values in a same table using the columns values. It is a Relation Reference option in QGIS 2.18 and works in Qgis but not in Qfield. The documentation of the Qfield say that Relation Reference is implemented. You are referring to filters layer? Thanks.

xyago avatar May 17 '18 10:05 xyago

Ah sorry, I misunderstood. I think you were talking about filters on the whole layer, not specific for this widget.

saemiw avatar May 17 '18 11:05 saemiw

This is not yet implemented. The documentation is unfortunately not that detailed that it would mention every option.

m-kuhn avatar May 17 '18 12:05 m-kuhn

Ok, thank you so much!!

Do you know any way to do that with Qfield?

xyago avatar May 17 '18 13:05 xyago

Nothing that comes to my mind which would not involve a new feature in QField, I am sorry.

m-kuhn avatar May 17 '18 14:05 m-kuhn

Comming with the next release :)

suricactus avatar Dec 08 '20 00:12 suricactus

Hello in my QField project I'm not able to use the filter function in relation reference widget. The same project works in QGIS as expected. Am I doing something wrong? immagine immagine

Thanks!

stafoo avatar Feb 01 '24 10:02 stafoo

Did this issue get solved? I too am using the relation reference widget and using 2 filters in it but in QField I can only choose the relation value and not the filters, they do not appear at all.

I am using the 3.3.11 Darien version of QField

Pavo123 avatar Sep 06 '24 12:09 Pavo123

I have the same kind of problem. My project has a relation between an observation layer and a list of species.

The list :

Image On this list, 3 protected species, and one unprotected.

The observation layer :

Image The observation is only described by the name of the species.

Both layers are linked by a project relation :

Image

In the observation layer's form, the name of the species is chosen via a relation reference.

Image There is a filter on the relation : only protected species can be selected.

In Qgis, when I want to add an observation, I can choose from these three species :

Image

But in QField, when I want to add an observation, the filter is not active :

Image

Is there a way to activate the filter? (It works for Value Relation, but I need to use a relation reference.)

QGis 3.34.6-Prizren QField 3.4.2 Ebo (Windows ans Android versions)

FelixHinckel avatar Jan 28 '25 15:01 FelixHinckel

@FelixHinckel , can you provide a sample project?

nirvn avatar Jan 31 '25 04:01 nirvn

@FelixHinckel , @xyago , this has been fixed. You can test APKs here (https://github.com/opengisch/QField/pull/5969) to confirm it works for you.

nirvn avatar Jan 31 '25 07:01 nirvn

I just tried it, it works very well! Thanks a lot!

FelixHinckel avatar Jan 31 '25 14:01 FelixHinckel