Notifications
Announcements
I have following fetch xml code:
Hi @Anonymous,
Your syntax is a bit off and your related contact is not pulling in a valid contact value (I believe). Try the following:
{% fetchxml contacts %} <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"> <entity name="contact"> <attribute name="firstname" /> <attribute name="lastname" /> <attribute name="fax" /> <attribute name="address1_line1" /> <attribute name="address1_line2" /> <attribute name="address1_stateorprovince" /> <attribute name="address1_country" /> <attribute name="emailaddress1" /> <attribute name="gendercode" /> <attribute name="birthdate" /> <attribute name="donotsendmm" /> <attribute name="preferredcontactmethodcode" /> <attribute name="donotemail" /> <attribute name="followemail" /> <attribute name="donotbulkemail" /> <attribute name="donotphone" /> <attribute name="donotfax" /> <attribute name="donotpostalmail" /> <order attribute="fullname" descending="false" /> <link-entity name="account" from="primarycontactid" to="contactid" link-type="inner" alias="ab"> <attribute name="fullname" /> </link-entity> <link-entity name="new_relatedentity" from="new_relatedentityid" to="new_isstest" link-type="inner" alias="ac"> <attribute name="new_name"/> </link-entity> </entity> </fetch> {% endfetchxml %} {% if contacts.results.entities.size > 0 %} Contact with AB and AC found! {% assign contact = contacts.results.entities | first %} AB Name: {{ contact.ab.fullname }} AC Name: {{ contact.ac.new_name }} Preferred Method of Contact: {{ contact.preferredcontactmethodcode.label }} ({{ contact.preferredcontactmethodcode.value }}) {% else %} No contacts found {% endif %}
Note that it won't return any results if there is no contact with both AB and AC related records, and both entities need to have proper Entity Permissions setup.
Hi Justin,
Thanks a lot for your reply.
I have implemented your suggested solution that works but value doesn't show for two options type field like {{contact.donotphone.label}}.
what could be syntax to show two option field value like donotphone?
I have resolved the issue. Two option works as boolean type. So it works fine.
Hi,
You can read my blog on how you can access column(field) of different data type using FetchXML and liquid in PowerApps Portal.
Part 1: https://vblogs.in/fetchxml-in-powerapps-portal/
Part 2: https://vblogs.in/fetchxml-in-powerapps-portal-part-2/
Thank You.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Jerry-IN 71
Fubar 62 Super User 2025 Season 2
sannavajjala87 31