cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VSJadhav
Helper II
Helper II

by liquid code, using fetchxml not able to retrieve entity records.

Hi Team,

Am using fetchxml to retrieve entity records.
However only 1st place attribute value is retrieving and filter condition is not working.
Getting all records of 1st attributes.

Requirement is :
Need to get the "Tax Rate" of "State" name

Below is my code:

{% fetchxml state_query %}

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">

  <entity name="test_statetaxrates">

    <attribute name="test_taxrate">

    <attribute name="test_statetaxratesid">

    <attribute name="test_name">

    <attribute name="createdon">

    <order attribute="test_name" descending="false">

      <filter type="and">

        <condition attribute="test_name" operator="eq" value="{{user.test_state.name}}"></condition>

      </filter>

    </order>

  </entity>

</fetch>

{% endfetchxml %}



{% for result in state_query.results.entities %}

   {{ result.test_taxrate }}

{% endfor %}

Getting result as all values of Tax Rates
Request you to provide your suggestions / Solution here.

Thanks,
Vaibhav



1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

By changing the sequence and removing order tag i got the resolution.
Below is executable fetchxml:

{% fetchxml state_query %}

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" enable_entity_permissions="true">

  <entity name="test_statetaxrates">

      <filter type="and">

        <condition attribute="test_name" operator="eq" value="{{user.test_state.name}}"></condition>

      </filter>

    <attribute name="test_taxrate"></attribute>

  </entity>

</fetch>

{% endfetchxml %}

View solution in original post

3 REPLIES 3
eliz_talent
Helper II
Helper II

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">

  <entity name="test_statetaxrates">

    <attribute name="test_taxrate"/>

    <attribute name="test_statetaxratesid"/>

    <attribute name="test_name"/>

    <attribute name="createdon"/>

    <order attribute="test_name" descending="false">

      <filter type="and">

        <condition attribute="test_name" operator="eq" value="{{user.test_state.name}}"></condition>

      </filter>

    </order>

  </entity>

</fetch>

give it a try on @eliz_talent suggested fetch

 

basically the idea is to properly close the attribute tags />




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Hello,

By changing the sequence and removing order tag i got the resolution.
Below is executable fetchxml:

{% fetchxml state_query %}

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" enable_entity_permissions="true">

  <entity name="test_statetaxrates">

      <filter type="and">

        <condition attribute="test_name" operator="eq" value="{{user.test_state.name}}"></condition>

      </filter>

    <attribute name="test_taxrate"></attribute>

  </entity>

</fetch>

{% endfetchxml %}

View solution in original post

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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (65,700)