Is it possible to use an optional variable (value2) like
... @qgsfunction(args='auto', group='Custom') def my_test(value1, value2=True, feature, parent) ....
in a custom function? Using QGIS 3.8
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Not sure of a direct way but there is the
handlesnull flag which when set to true would let you input
NULL as a parameter value.
... @qgsfunction(args='auto', group='Custom', handlesnull=True) def my_test(value1, value2, feature, parent): ...
You might want to include some logic in your code to determine what happens when a parameter value is