Skip to content

Commit

Permalink
Include NULL in expression builder available functions list
Browse files Browse the repository at this point in the history
Cherry-picked from 7b18f67
  • Loading branch information
nyalldawson committed Jul 9, 2015
1 parent d371fd6 commit 30dd60e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions resources/function_help/NULL
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<h3>NULL value</h3>
Equates to a null value.

<h4>Syntax</h4>
<pre>NULL</pre>

<h4>Arguments</h4>
None

<h4>Example</h4>
<pre> NULL &rarr; returns a null value </pre>

<h4>Note:</h4>
<p>To test for NULL use an <pre>IS NULL</pre> or <pre>IS NOT NULL</pre> expression.</p>
2 changes: 2 additions & 0 deletions src/gui/qgsexpressionbuilderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ void QgsExpressionBuilderWidget::updateFunctionTree()
registerItem( "Conditionals", "CASE", casestring );
registerItem( "Conditionals", "CASE ELSE", caseelsestring );

registerItem( "Fields and Values", "NULL", "NULL" );

// Load the functions from the QgsExpression class
int count = QgsExpression::functionCount();
for ( int i = 0; i < count; i++ )
Expand Down

0 comments on commit 30dd60e

Please sign in to comment.