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 / LookUp Corresponding R...
Power Apps
Unanswered

LookUp Corresponding Record in a Dataverse-related Flow (Power Automate)

(0) ShareShare
ReportReport
Posted on by 439

I’ve successfully set up Relationships between two tables within Dataverse, and I know these work correctly (via Forms in a Model Driven App, and via Galleries in a Canvas App (both Apps set to refer to the same Dataverse tables at source)). Given the relationships are at the data layer, I had anticipated that a Flow (in Power Automate) would understand that one table is related to another. I can’t identify this functionality and additionally, it seems both nonsensical and in fact impossible within Flow to introduce a step to look up a record on a corresponding table – since the GUID for the corresponding record in a second table is not known and can’t be determined.

 

I’ve attached a screenshot of a very basic Flow, which is triggered during a Business Process Flow run from within a Model Driven App (formal trigger name is: “When a flow step is run from a business process flow”). The Flow ‘knows about’ the master record to work on, given this record is already related to the BPF – in this example, the Table is EquipmentOrders. To test this, I put an attribute, ‘Quantity’, in to a Compose – and the correct value was presented on run of the Flow.

 

However, the intention of this Flow is that when submitted, the stock level of the equipment ordered by the user, stored in table EquipmentStockQuantities, will be reduced. Normally when using SharePoint as the data source, I would expect to apply an OData filter at this step and filter using dynamic data to grab one unique row. However, these two tables are related at the data layer in Dataverse so I can’t see why this is necessary in Flow. The BPF or the Flow will not know the GUID of the appropriate row in EquipmentStockQuantities and as that’s the primary key, that’s how I’d want to identify the correct row.

 

Not shown, but for completeness, the action ‘Update a row’ wants the Row ID – same problem in that I don’t have it. 

Another [inefficient but again for illustrative purpose] could be that I use the List rows action for table EquipmentStockQuantities and retrieve all the records on the list, but again, I can’t see how I would then refine that list to identify the single record to update (using OData filtering etc) since the GUID doesn’t seem to be known to the Flow – even though the two tables are related.

 

I’m sure there must be a very straightforward solution to this, as this seems fundamental to being able to work routinely with two related tables and two related records in Dataverse, but I can’t spot it and all my research hasn’t revealed it. Can anyone advise how the appropriate (related) record in the second table, EquipmentStockQuantities, can be reliably located by the Flow and updated accordingly?

 

Thank you very much for any assistance!

Categories:
I have the same question (0)
  • Bilakanti Profile Picture
    1,226 on at

    @pp365 I would recommend you to build the query using fetch xml and then add the same fetch xml query in your list and pass the id dynamically.

  • pp365 Profile Picture
    439 on at

    Hi @Bilakanti , thanks for replying.

     

    Would you be willing to share some additional details on the methodology for this as I have no idea what you mean. Anything further you can share would be great.

     

    The wider question still applies though: surely this basic requirement must be possible via the Power Automate UI (even in the form of some expressions at the most complex). Surely it can't be the case that this can only be done via a form of CLI?

     

    Thank you!

  • Bilakanti Profile Picture
    1,226 on at

    @pp365 - You need to filter Equipmentstockquantities table using the column that is present in Equipmentstockquantities right?

     

    Bilakanti_0-1674653284472.png

     

  • pp365 Profile Picture
    439 on at

    The source record is in Table EquipmentOrders. I want to look up the corresponding record in Table EquipmentStockQuantities in order to reduce the stock level for the equipment type on the record in EquipmentStockQuantities when an order is placed.

     

    I have already set up a relationship in Dataverse between EquipmentOrders and EquipmentStockQuantities. But I cannot see how to relate the two tables in Flow to perform the above desired requirement.

     

    I want to do this using the GUID if possible to ensure that the exact record is located - not a speculative search on, for example, 'Name', as there could be more than one equipment type with the same name.

     

    Does this help? Thank you very much @Bilakanti 

  • Verified answer
    pp365 Profile Picture
    439 on at

    For the benefit of anyone reading this thread in the future, the method I described in the original post is possible and is explained in @lisacrosbie 's brilliant "Power Apps Model Driven Apps" YouTube video in Module 11: Additional Process Automation.

     

    A direct link to the video and chapter is: https://youtu.be/LIC8DFW8fOE?t=11134 . I highly recommend this entire video, a fantastic resource.

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 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard