Need parameter.allowed_value.label to display user attribute value, but it's not working Help please

I am setting up a parameter in a view and need the allowed_value label to display the values of a user attribute, similar to how you would display them for a field label. However, the user attribute value is not being injected in the same way it would be injected into a field label.

Here's a truncated example:

parameter: level_of_detail {
type: unquoted
label: "Product Attribute to Use"
allowed_value: {
label: "{{ _user_attributes['sku_attribute_01'] }}"
value: "bsd.attribute_01"
}
}

 When I do this, it does not inject the value of the user's sku_attribute_01 attribute value, instead it just displays the contents of the label as a string:

Ben_Zitney_0-1697215723968.png

On the other hand, when I define a dimension field label in the same way ...

dimension: sku_attribute_01 {
type: string
label: "{{_user_attributes['sku_attribute_01']}}"
sql: ${TABLE}.attribute_01 ;;
}

... the user attribute value is successfully injected into the label (in this case, the value of my user attribute is "1" for testing purposes):

Ben_Zitney_1-1697215931644.png

So my question is why is this working in the field label parameter, but not in the label parameter for a parameter's allowed values?

Please let me know if you see anything I'm doing wrong, or if you know of any workarounds.

 

0 0 744
0 REPLIES 0
Top Labels in this Space
Top Solution Authors