Hi,
I'm trying to access the values from a multi select choices column, but I can't seem to find the correct syntax and the value is always blank. I'm using FetchXML and then displaying the data as a JSON.
Here is the code -
const data = [
{% fetchxml listings %}
<fetch>
<entity name="crbd7_catalogue">
<attribute name="crbd7_name" />
<attribute name="crbd7_category" />
<attribute name="crbd7_livestatus" />
<attribute name="crbd7_tags" />
<attribute name="crbd7_long" />
<attribute name="crbd7_lat" />
<filter>
<condition attribute="crbd7_livestatus" operator="eq" value="1" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
{% for crbd7_catalogue in listings.results.entities -%}
{
"name": "{{ crbd7_catalogue.crbd7_name }}",
"tags": "{{ crbd7_catalogue.crbd7_tags }}",
"live": "{{ crbd7_catalogue.crbd7_livestatus }}",
"category": "{{ crbd7_catalogue.crbd7_category.Label }}",
"long": {{ crbd7_catalogue.crbd7_long }},
"lat": {{ crbd7_catalogue.crbd7_lat }}
}
{% unless forloop.last %},{% endunless %}
{% endfor -%}
];
Any tips would be welcome.
Thanks