Check if value is null in List Records in Logic App

Posted on Posted in Azure, Logic Apps

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

 

Basically we are checking that List_records is not equal to 0

“@length(body(‘List_records’)?[‘value’])”,