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 Automate / Grabbing data from two...
Power Automate
Unanswered

Grabbing data from two different entities

(0) ShareShare
ReportReport
Posted on by 76

I have two different entities I need to grab data from in order to populate an attendance table. They are joined via two other entities. How do I go about getting my table populated. Here is the scenario:

Tables:

Course Enrollment - The three records I need here are course enrollment id and student id and academic period. 

Academic Period - This is the look up to the academic period from the course enrollment. 
Calendar - This has the academic period code that I get from the academic period table. 
Calendar dates - This has all of the individual dates in the calendar (ie, 9/6/2023, 9/7/2023)

What I am trying to do is update an attendance table. I need the course enrollment id, student id, and the individual date fields, but they are coming from two different tables, plus I have to join the academic period and calendar tables to get to the calendar dates table. 

I thought I could grab just the enrollment first:

ryeradio1_0-1679950552826.png

Then grab the dates using a Fetch XML query:

ryeradio1_1-1679950731161.png

But I keep getting an error with my XML. 

Is this a good way to do it? Is there a better way?

 

I am using the below XML and it is successful when I plug it into Fetch XML builder but I am getting this error: Key property 'mshied_schoolcalendardateid' of type 'Microsoft.Dynamics.CRM.mshied_schoolcalendardate' is null. Key properties cannot have null values.

 

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
<entity name="mshied_schoolcalendardate">
<attribute name="mshied_startdatetime" alias="startdatetime" />
<link-entity name="mshied_schoolcalendar" from="mshied_schoolcalendarid" to="mshied_calendar" alias="sc">
<attribute name="mshied_academicperiod" alias="ap" />
<link-entity name="mshied_academicperiod" from="mshied_academicperiodid" to="mshied_academicperiod" alias="ap">
<attribute name="mshied_code" />
</link-entity>
</link-entity>
</entity>
</fetch>

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @ryeradio1 ,

    Have you tried specifying an oData filter query in Filter rows?

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard