I have a choice field (crdxx_rating) defined on a table for ratings:
In my liquid fetchxml I want it to order the results by the choice value descending. The
documentation says that the fetch attribute 'useraworderby' set to true should do this, but even when setting that attribute I still get the results ordered by Label and records with the value 'Unrated' are coming first followed by '5-Star, 4-Star, etc' due to the string order. Why is fetchxml from liquid not honoring this fetchxml attribute for raw choice value ordering?
Fetchxml in liquid on the page:
{%- fetchxml sessionImagesLoad -%}
<fetch useraworderby="true" mapping="logical">
<entity name="crdxx_image">
<attribute name="crdxx_filename" />
<attribute name="crdxx_imagestatus" />
<attribute name="crdxx_imagetype" />
<attribute name="crdxx_rating" />
<filter>
<condition attribute="crdxx_imagetype" operator="eq" value="100" />
<condition attribute="createdon" operator="le" value='{{ "today" | date: "yyyy-MM-dd HH:mm:ss" }}' />
<condition attribute="statecode" operator="eq" value="0"/>
</filter>
<order attribute="crdxx_rating" descending="true" />
</entity>
</fetch>
{%- endfetchxml -%}