2

enter image description here

I'm trying to fill in a whole lot of cells in the same column of an attribute table all at once using the field calculator. Am I on the right track with the following expression?

"Author"  || example text

I have tried " ", ' ' and ( ), none of which seem to get the result I'm hoping for.

  • Can you provide more details ? Which column do you have, which type (integer, text, float, date) and what do you expect. – etrimaille Oct 28 '15 at 3:05
  • I have two columns one being Description and the other being Author. Both are text types. I was hoping to be able to fill all of the author ones via the field calculator to save me having to enter it 489 times. – QGISUser Oct 28 '15 at 3:46
  • 3
    "Author" || 'example text' – Nathan W Oct 28 '15 at 4:23
  • Do you want to use the "description" field ? Can you show us what you want in the "author" field ? (description + 'some text' or just 'some text') – etrimaille Oct 28 '15 at 4:53
  • 1
    We understood that you would like to the field calculator, I will never edit 5 rows manually. But you don't tell us what is the error and we have to understand your data model. Can you put a screenshot as @Joseph said ? – etrimaille Oct 29 '15 at 3:00
3

you don't even need the field calculator

In the table view, not the field calculator start editing. The new quick updater tool should appear
Select the author column from the drop down on the left In the blank box add your desired text in single quotes 'myname'
Click update all Done

or have I missed something?

  • That answered it. – QGISUser Mar 15 '16 at 0:22
3
"Author" || 'example text'

You need single quotes round the text string.

  • Good to know: double quotes " are to reference fields, single quotes ' are for pure string literals (text). Would be nice to see this in the answer so it explains a bit more background. – Matthias Kuhn Feb 15 '16 at 15:49

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.