Skip to content

enums/graph/<node>/<field>/categories/<setKey>

Back to Index

Defines a category (also called a “value set”) for grouping related enum values together. Categories help organize enum values into logical groups in the Portal UI.

To assign an enum value to a category, set the setKey property on the enum value configuration.

Properties

PropertyTypeDescription
labelobjectLocalized labels for the category. Keys are locale codes (e.g., default, sv-SE, en-US).

Example Value

{
"label": {
"default": "Customer Tags",
"sv-SE": "Kundtaggar"
}
}

Example Manifest

Create a category for customer-related order tags:

uri: /registry/enums/graph/order/tags/categories/customer
spec:
value:
label:
default: Customer Tags
sv-SE: Kundtaggar

Usage with Values

Values that don’t have a setKey assigned, or where the setKey doesn’t match any defined category, will appear in a default “uncategorized” group.

Example of a complete setup with a category and values:

# Define the category
uri: /registry/enums/graph/order/tags/categories/customer
spec:
value:
label:
default: Customer Tags
---
# Assign values to the category
uri: /registry/enums/graph/order/tags/values/vip
spec:
value:
label:
default: VIP Customer
hue: 280
setKey: customer
---
uri: /registry/enums/graph/order/tags/values/returning
spec:
value:
label:
default: Returning Customer
hue: 200
setKey: customer
Back to Index