Follow up 7e2e622 : improve functions help

This commit is contained in:
Mathieu Pellerin 2023-01-03 09:10:56 +07:00 committed by Nyall Dawson
parent 0885d36686
commit 660990e0d8
2 changed files with 8 additions and 8 deletions

View File

@ -8,11 +8,11 @@
"description": "an attribute name"
},{
"arg": "feature",
"description": "A feature. If not set, the feature attached to the expression context will be used.",
"description": "A feature. If not set, the current feature will be used.",
"optional": true
},{
"arg": "layer",
"description": "A vector layer. If not set, the layer attached to the expression context will be used.",
"description": "A vector layer. If not set, the current layer will be used.",
"optional": true
},{
"arg": "strength",
@ -21,10 +21,10 @@
}],
"examples": [{
"expression": "is_attribute_valid('HECTARES')",
"returns": "TRUE"
"returns": "TRUE if the current feature's value in the \"HECTARES\" field meets all constraints."
}, {
"expression": "is_attribute_valid('HOUSES',get_feature('my_layer', 'FID', 10), 'my_layer')",
"returns": "FALSE"
"returns": "FALSE if the value in the \"HOUSES\" field from the feature with \"FID\"=10 in 'my_layer' fails to meet all constraints."
}],
"tags": ["constraints", "hard", "soft"]
}

View File

@ -5,11 +5,11 @@
"description": "Returns TRUE if a feature meets all field constraints.",
"arguments": [{
"arg": "feature",
"description": "A feature. If not set, the feature attached to the expression context will be used.",
"description": "A feature. If not set, the current feature will be used.",
"optional": true
},{
"arg": "layer",
"description": "A vector layer. If not set, the layer attached to the expression context will be used.",
"description": "A vector layer. If not set, the current layer will be used.",
"optional": true
},{
"arg": "strength",
@ -18,10 +18,10 @@
}],
"examples": [{
"expression": "is_feature_valid(strength:='hard')",
"returns": "TRUE"
"returns": "TRUE if all fields from the current feature meet their hard constraints."
}, {
"expression": "is_feature_valid(get_feature('my_layer', 'FID', 10), 'my_layer')",
"returns": "FALSE"
"returns": "FALSE if all fields from feature with \"FID\"=10 in 'my_layer' fails to meet all constraints."
}],
"tags": ["constraints", "hard", "soft"]
}