Hello Experts,
I have a fetch XML query that gives the list of available organization in the CDS entity. I need to list all the organizations using the fetch XML and separate the fetch XML output using a comma and then assign it to a liquid variable.
My fetch XML query is as below,
{% fetchxml my_query %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="organization_entity">
<attribute name="organization_entity" />
<order attribute="organization_entity" descending="false" />
<filter type="and">
<condition attribute="organization_entity" operator="not-null" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
{% for result in my_query.results.entities %}
{% assign org = result.organization_entity | join: "," %}
{% endfor %}
In this case I get the output as:
T, e, s, t, , C, o, m, p, a, n, y, , 1T, e, s, t, , C, o, m, p, a, n, y, , 2
I want to get the output as Test Company 1, Test Company 2. and then assign it to a liquid variable. Could anyone please help me on achieving this..
Your help is greatly appreciated.
Thank you