Hi Everyone,
Today I got a requirement to check the record count and do some operation if the count is greater than 1. We are very much used to these kind of checks in C# and just think if we need to the same in Flow.
Here is the way to do. We just need to know one expression for doing it.
I have a following Action of List Records from CDS connector and renamed it to ListOfAccounts.
Declared an Integer variable and below the expression used for setting the value.
length(body('ListOfAccounts')?['value'])
Once we run the flow, the variable will have the count of accounts that are retrieved by List Records action. We can use same expression in conditions.
Hope this helps.
--
Happy 365'ing
Gopinath
Today I got a requirement to check the record count and do some operation if the count is greater than 1. We are very much used to these kind of checks in C# and just think if we need to the same in Flow.
Here is the way to do. We just need to know one expression for doing it.
I have a following Action of List Records from CDS connector and renamed it to ListOfAccounts.
Declared an Integer variable and below the expression used for setting the value.
length(body('ListOfAccounts')?['value'])
Once we run the flow, the variable will have the count of accounts that are retrieved by List Records action. We can use same expression in conditions.
Hope this helps.
--
Happy 365'ing
Gopinath
No comments:
Post a Comment