Hi,
I need to be able to concatenate a number and a string from a fetchxml query.
I've tried
{%assign holeDiam = result['cr203_holesize'] | append: ' - ' | append: diamUnit.Label %}
but it didn't work.
How can I do this?
Thanks
Hi,
I need to be able to concatenate a number and a string from a fetchxml query.
I've tried
{%assign holeDiam = result['cr203_holesize'] | append: ' - ' | append: diamUnit.Label %}
but it didn't work.
How can I do this?
Thanks
Convert the number to a string before putting it in the append.
{% assign foo = 8 | string %}
{% assign Whoop = 'sometext' | append: '.js' | append: foo %}
{{ Whoop }}
Output:
sometext.js8
vs this:
{% assign Whoop = 'sometext' | append: '.js' | append: 8 %}
{{ Whoop }}
will give a Liquid int cant conver to string error
(you may possibly also be able to use Liquid capture rather than assign and possibly not have to convert to string)
WarrenBelz
146,670
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional