QGIS/resources/function_help/json/formatted_attributes
Alessandro Pasotti c9c5896a77 formatted_attributes() expression function
Funded by: Kanton Solothurn
2021-11-25 15:36:34 +01:00

16 lines
1.3 KiB
Plaintext

{
"name": "formatted_attributes",
"type": "function",
"groups": ["Record and Attributes"],
"description": "Returns a map containing all attributes from a feature, with field names as map keys and formatted attributes as string values. Attributes are formatted as defined in the 'Attributes Form' section of the layer properties.",
"variants": [
{ "variant": "Variant 1",
"variant_description": "Returns a map of all attributes from the current feature formatted as defined in the 'Attributes Form' section of the layer properties..",
"examples": [ { "expression":"formatted_attributes()['type']", "returns":"value stored in 'type' attribute for the current feature formatted as defined in the 'Attributes Form' section of the layer properties."}] },
{ "variant": "Variant 2",
"variant_description": "Allows the target feature and the layer to be specified.",
"arguments": [ {"arg":"feature","description":"a feature"}, {"arg":"layer","description":"a vector layer"}],
"examples": [ { "expression":"formatted_attributes( feature, 'regions' )['name']", "returns":"value stored in 'name' attribute for the 'feature' belonging to layer 'regions', formatted as defined in the 'Attributes Form' section of the layer properties."}] }
]
}