[QGIS-Developer] NULL in field

Giulio Fattori giulio.fattori at tin.it
Tue Mar 30 02:32:25 PDT 2021


Hi all,

i have this simple field calc function:

from qgis.core import *
from qgis.gui import *

@qgsfunction(args='auto', group='Custom')
def fill_down(value1, feature, parent):

     k= 20
     if value1 == NULL:
         k = 10

     return k

it should return 10 if the field is empty but it doesn't work.

Any suggestions?

Best regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210330/48191696/attachment.html>


More information about the QGIS-Developer mailing list