mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
Fix if function example
This commit is contained in:
parent
332c1632f3
commit
b3edfa8080
@ -4,10 +4,15 @@
|
||||
"description": "Tests a condition and returns a different result depending on the conditional check.",
|
||||
"arguments": [
|
||||
{"arg":"condition","description":"the condition which should be checked"},
|
||||
{"arg":"result_when_true","description":"the result which will be returned when the condition is True"},
|
||||
{"arg":"result_when_false","description":"the result which will be returned when the condition is False"}
|
||||
{"arg":"result_when_true","description":"the result which will be returned when the condition is true or another value that does not convert to false."},
|
||||
{"arg":"result_when_false","description":"the result which will be returned when the condition is false or another value that converts to false like 0 or ''. NULL will also be converted to false."}
|
||||
],
|
||||
"examples": [ { "expression":"if( 1, 'One', 'Not One' )", "returns":"'One'"},
|
||||
{ "expression":"if( 8, 'One', 'Not One' )", "returns":"'Not One'"}
|
||||
"examples": [ { "expression":"if( 1+1=2, 'Yes', 'No' )", "returns":"'Yes'"},
|
||||
{ "expression":"if( 1+1=3, 'Yes', 'No' )", "returns":"'No'"}
|
||||
{ "expression":"if( 5 > 3, 'One', 'Not One' )", "returns":"'One'"}
|
||||
{ "expression":"if( '', 'It is true (not empty)', 'It is false (empty)' )", "returns":"'It is false (empty)'"}
|
||||
{ "expression":"if( ' ', 'It is true (not empty)', 'It is false (empty)' )", "returns":"'It is true (not empty)'"}
|
||||
{ "expression":"if( 0, 'One', 'Zero' )", "returns":"'Zero'"}
|
||||
{ "expression":"if( 10, 'One', 'Zero' )", "returns":"'One'"}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user