Get first row or single record column values from a List Row action without Loop in Power Automate using Dataverse
Problem Statement
When you retrieve a record from Dataverse or any data source by using filter condition using List Rows, it returns the matching records from the table which you can use loop for further action steps in Power Automate.
But sometimes when you have no primary key value with you and you want to read a record using other filters, you use List Rows which only contain one record. But as because its a List Rows Step, its because of its nature, creates a loop when you are using any value from the list row record.
So unnecessarily, an Apply to each step automatically added to your flow as given in below screenshot.
In the below example we are retrieving a contact record where mobile number is 12345678. So we are expecting a single record in the List Row result as mobile number is unique for each contact row. if you want to read email id from the record returned from the List Result it creates a Apply to each loop as given below.
So for this scenario, no need to use Loop. To avoid Loop use below solution.
Solution
Use Expression given below inside compose.
first(outputs(‘List_rows’)?[‘body/value’])?[’emailaddress1′]
Now if you run you will get the value but with out loop. Logic is we are getting first row from the list row result and then reading column value using expression.
The result is given below.
Hope it helps