For a building layer I have an attribute table with several fields for the building type where data was entered with a manually created form using checkboxes. Example:
Production: 1 = (yes), 0 = (no) Office: 1 = (yes), 0 = (no) Storage: 1 = (yes), 0 = (no)
and so on...
Now I want to label this layer with first letter of the respective building type. Like e.g: Production = P, Office = O, Storage = S and so on...
In case its only only one type its easy. I create a new field and use an expression like this:
CASE WHEN "Production" = 1 THEN 'P' ELSE '' END
But many buildings refer to multiple types, so I'd like to have expression that wraps everything up. It should check the state of the check box fields and concatenate the respective letters in a new field: Examples:
P/S O/S P/O P/O/S
How to do so?