I've been trying to add a new property to a vector layer named SERVICE, this property should be a string. I am able to create this property no problem, and the type is stated to be QString in layer properties.

Layer Properties

However, when I then open the feature attributes window to edit this property on a feature, the field appears and acts as an Integer, accepting only numbers and showing the adjustment arrows.

Feature Attributes

This strange behaviour disappears if I change the name of the attribute, even if I change it simply to "Service". For some reason the all caps version of this name seems to cause the field to act as an integer, even though it remains registered as a string in the layer properties.

I'd be interested to see if others are able to reproduce this behaviour, and if anyone knows why it is the case.

  • I could not reproduce the behaviour: I'm able to create an attribute called SERVICE, formatted as string, and add text to it, using a layer saved as Geopackage. Please add some information: how is your layer saved? In your first screenshot, the field has a length of 0: that might be a problem.
    – Babel
    Commented Mar 27, 2021 at 21:33
  • If you enter integers, save this: are the numbers saved? If you than again toggle editing and try to introduce a string and save it: what happens?
    – Babel
    Commented Mar 27, 2021 at 21:36
  • I can't reproduce in QGIS 318.1
    – user2856
    Commented Mar 27, 2021 at 22:00
  • Layer is saved as GeoJSON. Changing field length had no effect. Thanks all for trying this out.
    – Torantula
    Commented Mar 27, 2021 at 23:12

1 Answer 1


Upon returning to this problem this evening it seems to have resolved itself.

Likely the solution was simply restarting either QGIS or the computer itself, so if anyone else comes across this bug then this, as usual, would be a great place to start.

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.