I have various point and polygon layers (shapefiles) which I use regularly in QGIS (3.6.3), and often need to work out their location as an 8 figure grid reference (British co-ordinates, EPSG-code 27700, same code used by each project). For polygons this means working out the central point of the shape (centroid?) first and then converting this to a grid ref.
At the moment I am using the FSC plugin tools, 'OSGR Tool' and 'Add GRs to Layers Tool' to do this, but this means I have to go through the process every time I have a new/edited feature which I need the info for.
I would prefer to be able to automatically generate the grid ref every time a point/polygon is added/edited, within the grid ref field of the existing layer (see below). Is this possible?
I presume it could be done using the 'default value' option for the existing field, but I cannot work out what expression I would need to do this.