Skip to content

Commit

Permalink
Follow up 7e2e622 : improve functions help
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored and nyalldawson committed Jan 10, 2023
1 parent 0885d36 commit 660990e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions resources/function_help/json/is_attribute_valid
Expand Up @@ -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",
Expand All @@ -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"]
}
8 changes: 4 additions & 4 deletions resources/function_help/json/is_feature_valid
Expand Up @@ -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",
Expand All @@ -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"]
}

0 comments on commit 660990e

Please sign in to comment.