Concatenate strings in liquid if statement for label

rcrun
New Member

I am trying to concatenate strings inside a liquid if statement as part of the label argument of a dimension but can not figure out the correct syntax:

dimension: test_dimension {

    type: number

    label: “{% if condition == True %}

                    concat(‘String A’, ‘String B’)

                {% elsif condition == True %}

                    concat(‘String C’, ‘String D’)

                 {% endif %}”

}

I have tried concat, ||, and liquid | append syntax but can not seem to get any syntax to work. I think I somehow need to exit the quotations that the entire liquid statement is in to perform an operation - but could be wrong on that.

For reference I actually want the second string of the concatenate to be a _parameter_value but I would settle with knowing just how to concatenate strings for now

Bonus points if you can tell me how to get this same statement to work inside the label argument of a parameters allowed value. It seems to only register the liquid statement as one big string

Thanks in advance

1 0 967
0 REPLIES 0
Top Labels in this Space
Top Solution Authors