If we are using List Records (To get a list of records from Dynamics 365) in Logic App, some times we need to check if list returned any value or if its null before we use index 0 or greater to use the value
Below is the code we can use to check and will verify if it has any records returned
![](https://365rack.com/wp-content/uploads/2020/06/img_5c7e46032592a-1024x391.png)
![](https://365rack.com/wp-content/uploads/2019/03/img_5c7e4621ec9b1.png)
Basically we are checking that List_records is not equal to 0“@length(body(‘List_records’)?[‘value’])”,