web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / execute liquid array f...
Power Pages
Unanswered

execute liquid array filters on fetchxml results.

(0) ShareShare
ReportReport
Posted on by 20

hi, 

 

is it possible to execute liquid array filters on fetchxml results ?

 

For example I have this fetchxml query :

{% fetchxml fetchSoldTo %}
<fetch>
  <entity name="pre_contactaccountmapping">
    <attribute name="pre_visible" />
    <attribute name="pre_contactaccountmappingid" />
    <attribute name="pre_portalcontactfrom" />
    <filter>
      <condition attribute="pre_portalcontact" operator="eq" value="{{ user.id }}" />
    </filter>
    <link-entity name="account" from="accountid" to="pre_itemssoldtoaccount" alias="acc">
      <attribute name="accountid" />
      <attribute name="name" />
      <attribute name="accountnumber" />
      <attribute name="address1_city" />
      <order attribute="accountid" />
      <link-entity name="pre_country" from="pre_countryid" to="pre_countryid" alias="ctry">
        <attribute name="pre_name" />
        <attribute name="pre_countrycode" />
      </link-entity>
    </link-entity>
  </entity>
</fetch>
{% endfetchxml %}
 
I need the results of this query but I want to reuse this query to get the number of unique pre_portalcontactfrom values,
so I try : 
{% assign uniqueContactsFrom = fetchSoldTo.results.entities | group_by: 'pre_portalcontactfrom' %}
and use {{ uniqueContactsFrom.size }} but this gives not the right result.
 
or can I use a where condition to get a specific record?, ex :
{% assign myContact = fetchSoldTo.results.entities | where: 'pre_portalcontactfrom', '11111111111111111111' %}
 
I try to use these liquid array filters, but doesn't seem to work :
https://learn.microsoft.com/en-us/power-apps/maker/portals/liquid/liquid-filters#array-filters
 
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard