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 Apps / Conditions are not sup...
Power Apps
Unanswered

Conditions are not supported on Link entities

(0) ShareShare
ReportReport
Posted on by 5

Data type is Choice for the msdyn_energytype attribute in dataverse. Only using <attribute name="msdyn_energytype" /> in the fetchXML is returning the Integer value instead of the label. Therefore, I'm trying to create a link-entity with stringmap (which has the choice details). However, I'm getting an error that says Conditions are not supported on Link entities.

<fetch>
 <entity name="msdyn_purchasedenergy">
 <attribute name="msdyn_name" />
 <link-entity name="stringmap" from="attributevalue" to="msdyn_energytype" link-type="outer" alias="sm" visible="true">
 <attribute name="value" />
 <filter>
 <condition attribute="attributename" operator="eq" value="msdyn_energytype" />
 </filter>
 </link-entity>
 </entity>
</fetch>

Entire call stack is as follows:

sarthakbehera_0-1707651217185.png

I have created a similar query (snippet below) for another entity but it works fine.

<fetch>
	<!-- Entity: Organizational hierarchy -->
	<entity name="msdyn_sustainabilityorganizationalhierarchy">
		<!-- Organizational unit -->
 <link-entity name="msdyn_sustainabilityorganizationalunit" from="msdyn_sustainabilityorganizationalunitid" to="msdyn_organizationalunitid" link-type="outer" alias="msdyn_sustainabilityorganizationalunit">
			<attribute name="msdyn_name" />
			<!-- Organizational unit type-->
 <link-entity name="stringmap" from="attributevalue" to="msdyn_organizationalunittype" link-type="inner" alias="stringmap" visible="true">
 		<attribute name="value" />
 		<filter>
 			<condition attribute="attributename" operator="eq" value="msdyn_organizationalunittype" />
 		</filter>
 		</link-entity>
		</link-entity>
	</entity>
</fetch>

 

Please advise on what can be changed in the xml query to resolve this issue. I'm using this query in a copy activity of ADF

I have the same question (0)
  • Guido Preite Profile Picture
    1,488 Super User 2024 Season 1 on at

    FetchXML returns also the label of choice attributes, depending on which language you are using and the returned result how you deal with the label (for example if doing with Web API they are inside the property

    <choicename>@OData.Community.Display.V1.FormattedValue

  • sarthakbehera Profile Picture
    5 on at

    Hello,

    Thanks for the feedback. Please note that I wouldn't be able to use any programmatic language and I need to use the query as-is in ADF copy activity

  • Guido Preite Profile Picture
    1,488 Super User 2024 Season 1 on at

    I don't know how to deal with the results inside Azure Data Factory, but the raw XML result of a fetchxml is like the following:

     

    <resultset morerecords='0'>
    <result>
    <accountratingcode name='Default Value' formattedvalue='1'>1</accountratingcode>
    <name>ABC</name>
    </result>
    </resultset>

     

    as you can see in this example, accountratingcode is a choice, the value is 1 but there is a property called name that contains the label

  • Parvez Ghumra Profile Picture
    1,579 Moderator on at

    @sarthakbehera Have you tried changing the link-type to inner?

  • sarthakbehera Profile Picture
    5 on at

    Yes, then there's a different error. It says: Only left outer join is supported in link-entity.
    I'm surprised as to why everything in the second query works but fails in the first query

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard