Dataverse Lookup In Power Automate

Introduction

When using dataverse you will eventually come across a need to use power automate with lookup columns, this can be quite daunting at first as it’s not as straight forward as first seems. In this post we will show hoe easy it is to update the lookup column in power automate.

Creating The Power Automate Flow

In this example we have a table with a column called ‘Assigned To’ this column as we can see below has a lookup to the ‘Users’ table. This is a common one which most developers know, but the principles still apply to all lookups.

For this example we are simply going to update the ‘Assigned To’ in the Power Automate Flow with the user that last modified the record. When we add a new row we can see that the ‘Assigned To’ column had ‘(Users)’ this means there is a lookup to the users table.

 

 

Entity Set Name – Method 1

To update this record we first need the ‘Entity Set Name’. We can get this a few different ways, first we need to go to the table the lookup value is pointing at, in this case it’s ‘Users’ table. If we go to tools and select ‘API Link to table definition’

This will open a new tab with API details for the table, here we simply need to search for ‘EntitySetName’, this will show the name as ‘systemusers’

 

 

Entity Set Name – Method 2

There is another way to get the Entity Set Name Microsoft have recently added ‘Copy set name’ to the tools menu. This now makes it super easy to get that same value:

You may notice in most cases the value is usually the table name with an ‘s’ on the end however this is not always the case for example if the table name ends with a ‘s’, ‘Orders’ the entity set name might be ‘orderses’. Also unless it is a built in table it will also use the solution name, in my example my orders table is ‘pt_orderses’

Now that we have the entity set name we use this in our lookup value surrounded by ‘(‘ and ‘)’. Finally we need to add the GUID from a record out the the user table. We can do this by copying a value from the users table or in most cases you can use dynamic content to get a value as shown below. I have used the modified value from a previous action

Like this post? Why not share it!

LinkedIn
WhatsApp
Facebook
Reddit
X
Email

View more blog posts

Creating A Dataverse Table

11 min read

Read this blog

Power Automate FormatDateTime Expression

2 min read

Read this blog

Power Automate Error Handling

4 min read

Read this blog

Trigger Power Automate Flow From Canvas App

4 min read

Read this blog

Get In Touch

Let’s talk. Send us a message, and we’ll help you explore the best Power Platform solution for your business

We can turn your mondain tasks into effective workflows, saving you and your business time and money