Can someone please help. I have created a dataverse table in power pages and I want to display the data from this table grouped and summed.
I could use something like PowerBI but I want to group and sum it for free, not pay.
I tried Liquid code but can’t get it to work – see details in post.
I am new to power apps and power pages, I have very limited coding experience.
I need to take the data from my dataverse tables and display it on screen, for external customers, grouped and summed.
So for example I have a dataverse table called ATestTable1 with two fields “Name” and “Weight”
I want to show the data from this grouped on the Name field with a subtotal of Weight per grouped Name, and an overall total of Weight.
I am using ChatGPT to walk me through it.
It says the only free way I can display a grouped/summed table/report on power pages is to use Liquid code.
But I have gone around in circles with it trying to get it to work.
When I create a page in power pages and add the ATestTable1 as a List – it displays fine (in design mode and preview) – I can see the data displayed from the table fine.
ChatGPT has given me liquid code to try – for the grouping and summing – but it doesn’t work – no data at all comes through.
I told GPT to give me the simplest possible liquid code (no grouping or summing) just to see if could pull any data at all from the table.
It gave me the following code. I went to Edit Code on the power pages page, and inserted the code there, saved, synced back in ppages.
But after syncing I get “No records found in the table” (as per the last condition of the code it gave me).
The powerpages will ultimately be used for dozens of external customers
So my questions are:
Is liquid the only way I can get a grouped/summed output of my table data for free in power pages, without paying for eg. PowerBi, and without using any kind of complex code.
If so, why is this code not working, why does it always show “no records found in the table” per the last condition
<div class="row sectionBlockLayout text-start" style="display: flex; flex-wrap: wrap; margin: 0px; min-height: auto; padding: 8px;">
<div class="container" style="display: flex; flex-wrap: wrap;">
<div class="col-lg-12 columnBlockLayout" style="flex-grow: 1; display: flex; flex-direction: column; min-width: 250px; padding: 16px; margin: 60px 0px;">
{% assign records = entities.ATestTable1.items %}
{% if records != null and records.size > 0 %}
<ul>
{% for record in records %}
<li>Name: {{ record.Name }}, Weight: {{ record.Weight }}</li>
{% endfor %}
</ul>
{% else %}
<p>No records found in the table.</p>
{% endif %}
</div>
</div>
</div>