5

I have this irritating problem with "\" symbol in field calculator in QGIS. I'm trying to insert an URL field in order to open feature specific pictures later as an action, but as I insert the symbol in question, it is not recognized. See below. Preview will be the result if I hit OK.

Column's data type is text and layer is UTF8 encoded. I'm using QGIS 3.2.0 on Windows 10.

It's a small issue, but I can't wrap my head around it.

  • Did you try the concat function(under String operations)? example: concat( 'Turku','/','2018') – Mazu_R Aug 23 '18 at 7:48
  • 3
    Try this "\\". The related discussion could be found here Changing a string of text in QGIS – Taras Aug 23 '18 at 7:50
  • @TarasDubrava Your answer seems to be correct. Can you elaborate why double symbol is needed? If there's no duplicate question for this, you could post an answer. – Ville Koivisto Aug 23 '18 at 8:52
  • 1
    Possible duplicate of gis.stackexchange.com/questions/263211/… – AndreJ Aug 25 '18 at 8:28
  • I assume moderators have/will check if this is a duplicate without informing them separately. – Ville Koivisto Aug 27 '18 at 5:11
11

Ville Koivisto, I could assume that you are working on Windows OS, is not it?

Therefore, it requires doubled backslashes \\.

References:

  • Yes, on windows 10. Edited my question. Cheers Taras! – Ville Koivisto Aug 24 '18 at 13:25
  • @Ville Koivisto, I hope it was helpful enough. – Taras Aug 24 '18 at 14:24

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.