funny, i am working on a similar problems, shall also display work orders. Small world obviously 🙂
For liquid, there is a fetch available. You could do something like
{% fetchxml dataCheck_query %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" no-lock="true">
<entity name="contact">
<attribute name="fullname" />
<attribute name="adddress1_line1" />
<attribute name="adddress1_city" />
<attribute name="createdon" />
<filter>
<condition attribute="statecode" operator="eq" value="0" />
</filter>
<order attribute="fullname" descending="false" />
</entity>
</fetch>
{% endfetchxml %}
this fetches contacts, but you get the story. Various entities could be related via the <link-entity> tag.
then you have to loop over the results:
<table> {% for entityVariable in dataCheck_query.results.entities %}
<tr>
<td>Attribut-1: {{ entityVariable.fullname }}</td> <td>Attribut-2: {{ entityVariable.adddress1_line1 }}</td>
</tr>
{% endfor %}
</table>
For simple values, you can directly use the values. For lookups you receive an object with Name, Id and LogicalName, for optionsetentries you receive Label and Value.
You can also access attributes from linked entities, but i always struggle with that. Have no example at hand. its something like entityVariable[<alias>].<attributenameintable> . But i am not sure, would have to check.
You can also set up the fetchxml with variables, so
{% fetchxml dataCheck_query %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" no-lock="true">
<entity name="contact">
<attribute name="fullname" />
<attribute name="adddress1_line1" />
<attribute name="adddress1_city" />
<attribute name="createdon" />
<filter>
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="contactid" operator="eq" value="{{ request.params.id }}" />
</filter>
<order attribute="fullname" descending="false" />
</entity>
</fetch>
{% endfetchxml %}
works perfectly.
Does this already help a little bit?
Have fun,
Christian