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

Announcements

News and Announcements icon
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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 46

#2
Valantis Profile Picture

Valantis 24

#2
omkarsupreme Profile Picture

omkarsupreme 24

Last 30 days Overall leaderboard