QField icon indicating copy to clipboard operation
QField copied to clipboard

value relation widget issues

Open zvaragabor opened this issue 2 years ago • 3 comments

Hey folks,

I've encountered an issue with value relation widget. Actually it is a multiple issue.

  1. It won't remember the value I choose, it switches to an other value from the list right away. Even if I type the value in the box, or choose it from the search window. It seem so me that Qfield switches to the first value of that type from the csv table. https://youtu.be/_xvaum9aA8M
  2. If I manage to choose a value, it cannot be edited (like it could not recognize my finger touching it). https://youtu.be/58rG7RntfWA
  3. I cannot search in the search window, it won't give me suggestions (only if a filter expression criteria is met based on an other attribute) https://youtu.be/dhsmXheH6GI

Just to clarify things a bit, I have a point shapefile, with two attributes (relevant in the issue).

  1. A Value map widget, with 13 different values.

kép

  1. A Value Relation widget, where I have a csv, attribute structure shown in pic below.

kép

kép

The goals, is to be able to filter the second attribute based on the value set in the first attribute. But If I do not set any value in the first attribute, the second attribute should let me search/choose from the whole list. The issues mentioned above are issues encountered during this process.

Sorry guys, I can't really explain the issues in detail, as english is not my native language, and it's a bit hard to make a reasonable sentence with these technical terms. :)

Everything's working fine in QGIS.

I've attached the project.

**QField version: "1.10.0" (1da006 v.1.10.0)

Problem can be reliably reproduced, doesn't happen randomly: [Yes]

zvaragabor_Issue_project.zip

zvaragabor avatar Feb 07 '22 09:02 zvaragabor

Just wondering... In your value relation for the Biotika, the key column is the field "ID". But I think the key is not really a key or ID because it is not unique (I see 4 times value 5, 18 times value 1, 4 times value 13...). In other words, perhaps it's the project which causes the problem? You should check if the values are really saved as you wish in QGis. I experienced once that I thought the information was saved correctly but it didn't (values were wrong in the attribute table).

By the way, I love the Salamandra salamandra ;-)

afbeelding

BoswachterMarc avatar Feb 09 '22 19:02 BoswachterMarc

Just wondering... In your value relation for the Biotika, the key column is the field "ID". But I think the key is not really a key or ID because it is not unique (I see 4 times value 5, 18 times value 1, 4 times value 13...). In other words, perhaps it's the project which causes the problem? You should check if the values are really saved as you wish in QGis. I experienced once that I thought the information was saved correctly but it didn't (values were wrong in the attribute table).

By the way, I love the Salamandra salamandra ;-)

afbeelding

See the following printscreens and this article: https://www.northrivergeographic.com/archives/qgis-3-2-drive-down-lists-aka-value-relation-widget

image

image

image

BoswachterMarc avatar Feb 09 '22 19:02 BoswachterMarc

Hey Marc,

Thank you, it worked! It was my fault that the ID column was not a uniqe value. I'm still learning the use of these widgets. :)

Issue 1 is solved, issue 2 can be by-passed, BUT issue 3 still exsist: -If I set a value in "Csoport", I won't be able to search in the search window in Qfield. If no value is set, I can search though.

zvaragabor avatar Feb 10 '22 09:02 zvaragabor