2

I am using "Unique Values" widget with "Editable" option in QGIS 2.18.3, for my "Name" field in POIs layer to eliminate spellings mistake.

"Unique Values" widget fetches all the distinct values in a drop-down list which matches with your text string from the layer.

Now I need a solution to fetch values only within the specific buffer of a newly added point. I mean, when I add new feature point it should fetch values within 30 meters buffer of my point, matching with my text string.

I need this solution to eliminate duplication with existing data which is very common in our Data Entry case. Is it possible to use some "Expression" in "Constraint" option?

  • You didn't understand my problem. I want it to work on the fly. – Furqan Saeed Mar 1 at 9:58
  • So you are using 'Unique Values' to try to ensure that someone entering data can only use a value which has been used in that field previously? And now you want to constrain the available values to those used in nearby points? – Rostranimin Mar 1 at 10:33
  • 1
    Is there a reason you're not using the 'Value Relation' (or even 'Value Map') widgets? Value Relation would allow you to define the available values in a secondary data table. To my mind that's an easier way to administrate such things. I'm not sure it helps with your buffer question though... – Rostranimin Mar 1 at 10:38
  • @Rostranimin Thanks for your comment. "Value Map" or "Value Relation" only let you use available values from secondary data table. However, "Unique Values" let you enter new values. – Furqan Saeed Mar 4 at 6:20
  • @Furquan Saeed: Fair enough. My system is to make it as easy as possible for users to add to the secondary table if they need an value which isn't available (it can be made even easier with a custom user form and a button to run a python script to open the secondary data). But I can see this has disadvantages. On the other hand, your proposed system also risks creating the duplicates you're wanting to avoid (as far as I can see) - because if the search only shows values nearby it may omit potential duplicates from further away - although perhaps that isn't a problem with your data? – Rostranimin Mar 4 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.