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 / Trouble looping throug...
Power Automate
Answered

Trouble looping through dataverse data for each organization

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Problem:

I am pulling in date from a Travel table, and want to loop through that table to create an email per organization (which is a lookup table in the Travel table). I can send out an email with the data loaded in via List Rows w/ some criteria, but can't figure out how to loop through based on Organization column to send one email per org.

 

Goal:

Send an email to specific people that contains all the requests made for their organization within the last 7 days that have not been reviewed.

 

Filters on List Rows:

filter rows: cr74d_statusv2 eq 5

sort by: _cr74d_organization_value

 

I have tried looping through the Organization in the Travel Table, but that didnt work. I also tried looping through the TravelRequest data by creating a loop on the outside with the Organization Table but couldn't figure out how to compare the Organization ID in the Travel Request table, to the string in the Organization Table.

 

I followed this post to get where i am right now. Create Dataverse Links / URLs in HTML Tables using Power Automate — Amey Holden | ABC Enthusiast & Power Platform Specialist

 

Any advice/points would be greatly appreciated.

 

Current Flow:

Screenshot 2022-10-04 144753.png

 

Basic table setup:

Travel Table

Travel NumOrganizationTeamRequestorTravelerCostFare typestatus
1abcqwerzachzach5000economyNot Reviewed
2xyzaabbwaynewayne400economyNot Reviewed

 

Organization Table

OrganizationTeamCoS
abcqwerwayne
yxzaabbbreanna
Categories:
  • Verified answer
    zachm Profile Picture
    Microsoft Employee on at

    So i had the setup right, but the logic was a little off. In the first List Rows query, i needed to make sure to get the first item back from a previous query. This fixed my issues with not having arrays for the loop and then not causing my list rows to run through more than once.

     

    _cr74d_organization_value eq 'first(outputs('get_org_id')?['body/value'])['cr74d_mcigetditeamsid']'
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 288 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard