6

I have a point layer postgis with some fields that georeference the point (comune, provincia, river etc.) I need to set these fields with a default value that appears in qgis form when I insert a point, possibly I can change them. enter image description here So I solved it introducing sone default function using refFunctions v1.0 plugin.enter image description here I have used 5 functions like this. It works fine but after inserting the point I must wait 10 second to open the form. So I have the fields already filled but it's all slower. Using postgis trigger or autofield plugin I can't see the default values in form and this doesn't help me to correct inaccuracies.

Some ideas to speed things up?

UPDATE

I'm triyng to develop a solution using QGIS field calculator in python? Every suggestion is welcome

  • The 'mview_limiti_comune_vl' layer is view? – pigreco Jun 20 '17 at 12:06
  • Yes, it's a materialized view to limit the size of original layer. – Daniele Piccolo Jun 20 '17 at 12:08
  • out of curiosity: how did you get the combo boxes in your first image? is it a new feature from QGIS 2.18 to display foreign keys? nevermind i found it – LaughU Jun 22 '17 at 8:03
  • it isn't a new feature. It is a "value relation". You can choose from a list that is a field of a loaded layer – Daniele Piccolo Jun 22 '17 at 8:10
3

Unfortunately some of the reffunctions functions are inefficiently written and resort to fetching tons of features from the layer, resulting in this delay. I'd file a bug with the reffunction plugin itself.

  • Yes, it's true. So i'm trying to develop a python solution – Daniele Piccolo Jun 22 '17 at 7:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.