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 / multiple related datav...
Power Automate
Answered

multiple related dataverse tables - with conditions and variables!

(0) ShareShare
ReportReport
Posted on by

HI All

 

I'm an absolute beginner and struggling with a flow to automate a process in my app. 

 

I have 4 Data verse tables. A "Header" table which creates an auto-number, and has a lookup to a "customers" table. A "Details" table which has a parent/child relationship to the header table, and also a lookup to a "products" table.  So it's basically like an orders app, except in this case it's items being returned to us.  I want a flow that sends an email eventually to the person responsible for processing the return, so needs to have the auto-number, the customer details, the details of the products being returned, and the type of return to be processed.

 

I have my trigger as a modify record in the headers table (added a field to say when "completed") - and I then need to pull in the customers, and the details of the return (can be several rows) (and so also the products table!).   I also have a choices column in my details table which specifies which type of return....  I tried initializing a variable using some help from online, but although it says it succeeded it's not showing the result.

 

Here's what i have:

rowan_preston_0-1651176890713.png

rowan_preston_2-1651176972894.png

rowan_preston_0-1651177292901.png

But although it says it ran successfully - this is my result...  the detail lines are both listed correctly, but the "TYPE" should be a column on the end!  My variable is blank!

rowan_preston_3-1651177583053.png

rowan_preston_2-1651177497164.png

Apologies for the long post - any advice/help greatly appreciated!

Categories:
I have the same question (0)
  • WillPage Profile Picture
    2,311 Super User 2026 Season 1 on at

    Your Compose 2 action inside Apply to each has the expression written as text instead of in the expression editor. Having said that, it's not clear what you're doing with that outside of the Apply to each.

    Despite that, your flow structure needs a bit of work. If you had a value in the RA Type variable it will be a static value and appear the same for each row of the HTML table. Are you trying to expand the value of that choices column and filter the list by its value so only items with RA Type = credit are shown in the HTML table?

  • rowan_preston Profile Picture
    on at

    Hi - thanks for your reply.

     

    Yes - that's exactly what I would like to do!  have just the credits show in the table and it will be emailed to one person, and if its not a credit a similar filtered table will be emailed to a different person.

  • Verified answer
    WillPage Profile Picture
    2,311 Super User 2026 Season 1 on at

    Add a Select action after your List Rows. Put the output of the list rows into the Select and add the key value pairs for the columns you want to keep. Much like what you've done with the Create HTML Table but name the column headers (they can't be blank) and in the RA Type column add the expression item()?['rp_ratype@OData.Community.Display.V1.FormattedValue'] or find its dynamic content.

    Next, go Filter array and filter the output of that Select for item()?['RA Type'] is equal to Credit assuming you named the column RA Type in the previous Select action. You can then convert the result of that to HTML but you don't need to manually select the columns any more because you already did that in the Select.

  • rowan_preston Profile Picture
    on at

    Wow - I cannot thank you enough!  This just made my day!!!  Something I have been struggling with for DAYS and you solved it in a minute.  Thank you so much!!

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