cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aljor
New Member

Split fetchxml result into liquid by linked-entity attribute

Hi,

 

Anyone know if there is a way to split fetchxml result into liquid variable by linked-entity attribute? 

Something like this:

 

{% fetchxml query %}
<fetch version="1.0" output-format="xml-platform">
 <entity name="account">
 <attribute name="name" />
  <link-entity name="contact" from="accountid" to="accountid" alias="con">
   <attribute name="firstname" />
  </link-entity>
 </entity>
</fetch>
{% endfetchxml %}

{% assign all_joe = query.results.entities | where: 'con.firstname', 'joe' %}

 

1 ACCEPTED SOLUTION

Accepted Solutions
OOlashyn
Super User
Super User

Hi @aljor ,

Unfortunately, you will need to use for loop with if inside of it to perform filtering on the linked entities. Neither where or select will work for linked entities fields. My assumption is that this is because of the dot notion name of the field + where doesn't work with a nested properties (at least in liquid based on ruby).

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

View solution in original post

2 REPLIES 2
OOlashyn
Super User
Super User

Hi @aljor ,

Unfortunately, you will need to use for loop with if inside of it to perform filtering on the linked entities. Neither where or select will work for linked entities fields. My assumption is that this is because of the dot notion name of the field + where doesn't work with a nested properties (at least in liquid based on ruby).

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

View solution in original post

NikitaP
New Member

I also suggest doing so up in the query, but if you do need the full result set...I am not sure how big your Account table is...and the Entity Permission at play to limit it.

 

Use iteration tags for a portal - Power Apps | Microsoft Docs

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (57,204)