| Muhammad Yaseen
HOW TO OVERCOME FOR EACHLOOP ON LIST ROWS IN POWERAUTOMATE
If you use List rows connector in your flows you will noticed it will normally get more than 1 row if data available. So whenever you use the values coming from this list rows connector it will automatically be under for each loop which is sometime unnecessary, if firstname is a unique column in your contacts table, if you filter rows like
Firstname eq ‘somename’
Power Automate will wrap the output of this list rows in Apply to each loop.
We use Contacts table in list rows connector.
The output value First Name we use in the compose connector. It is automatically be wrapped in Apply to each loop.
To overcome this issue we can use expression “first” or “last” according to our need.
First/Last (output from your list of rows)? [‘Column Name’]
In this way you will overcome unnecessary looping.
Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.