1

I have a QGIS program that is hosted on a SharePoint server that is used by multiple users. I have entered a rule for a point layer that when new features are created default values are added under certain fields. One such is generating the PARCEL_ID of the Field Parcel that the point feature is located in.
To generate this I have set the default value in the fields widget properties to:

if (geomwithin('Field Parcels' , 'PARCEL_ID') is not NULL,geomwithin( 'Field Parcels' , 'PARCEL_ID'),geomintersects('Field Parcels' , 'PARCEL_ID'))

This works for me normally, but for other users and if I use it on a remote assess computer it produces

syntax error, unexpected '(', expecting COMMA or ')'

All users are using QGIS 2.18.20

Whats going on?

  • Not sure if this is your issue, but normally it would be if( not if ( -- no space between if and the left parenthesis. – csk Jul 26 '18 at 16:57
  • @csk Thanks for your help. I have tried adjusting spaces and using proper formatting but to no avail. From my very limited understanding, spaces don't matter in expression dialog. – P Dreyer Aug 1 '18 at 16:33
  • 1
    The geomwithin() and geomintersects() functions are enabled by the refFunctions plugin. Do all your users have the current version of this plugin installed? – csk Aug 1 '18 at 17:30
  • @csk You're a genius and I'm a fool. Thank you so much, that has sorted it. – P Dreyer Aug 6 '18 at 11:43
  • Don't worry about it. Once you've had a plugin installed for a while it's easy to forget that it's not a core feature. Case in point, it wasn't until I tried to re-create your issue that I remembered those functions aren't core features. – csk Aug 6 '18 at 16:49
1

The geomwithin() and geomintersects() functions are enabled by the refFunctions plugin. All users must have the current version of this plugin installed and enabled. enter image description here

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.