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:
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