Has anyone used the format() function in the expression builder?

The definition states it require arguments. just playing around with it but cant find too much on this function so i am not sure on its actual use/output/argument requirements.

  • Welcome to GIS SE! As a new user be sure to take the Tour to learn about our focussed Q&A format. Rather than asking "Has anyone used the format() function in the expression builder?", I think you should report what happened when you tried to use it, and if you got stuck, then any errors, etc that you observed.
    – PolyGeo
    Commented Jul 20, 2017 at 4:10
  • Hi thanks for the reply and advice. unfortunately there is nothing to report as well have no idea where to start. Just looking for a little hint or detail on what it actually does or what it needs to work. Just to point me in right direction then I can go off and play around with it. Most of the other functions I understand and can crack this has stumped me and. Am struggling to find any info on it. I am guessing it's not used much. Commented Jul 20, 2017 at 7:48
  • Where did you come across it? For example, a link to any mention of it in any documentation, or some instructions on how to find it in the GUI.
    – PolyGeo
    Commented Jul 20, 2017 at 7:54

1 Answer 1


This is the help text in Field calculator:

function format
Format a string using supplied arguments.

format(string, arg1, arg2, ...)

A string with place holders for the arguments.
Use %1, %2, etc for placeholders.
Placeholders can be repeated.
any type. Any number of arguments.

format('This %1 a %2','is', 'test')
→ 'This is a test'
  • Sorry about the delay in response. much appreciated for your response i will check it out and play around. And will see how useful this can be. Commented Jul 26, 2017 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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