0

I have the same challenge as GrahamD - How to use the replace string function in Field Calculator?

I have exactly the same challenge.

Exactly the same as GrahamD's challenge, p abbreviated for pan. Type_2 as a test column. duplicated.

Using underdark and eseglem's formulars/advice here is the copy and paste directly from the expression box:

replace("Type_2", "p", "pan")

All text and quotations in red. ok button greyed out.

Output preview: expression invalid Parser Error: (nothing detailed) Eval Error: Column 'p' not found

I get exactly the same results should I swop Type_2 and p around.

2

In the Field Calculator;

  • a "field"
  • a 'value in the field'

what you do is :

  • replace in field "Type2" field "p" by field "pan"

then what you want to do is:

  • replace in field "Type2" value 'p' by value 'pan'

so:

replace("Type_2", 'p', 'pan')

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