Sunday, 30 August 2020

Get a single/first record from CDS/Dynamics 365 List Records action step in Power Automate/Microsoft Flow


Hi Everyone,

Today I was working on Microsoft Flow and I have List Records step configured in the flow. As per the requirement, I know that the result of the List Records step would be one record or empty. We all know that to get the data from List Record, normally go with Apply to each step as I already know that the output count of records would not be more than 1 taken below approach.

List Records Step  -->  Take the required values using First function.

first(body('List_records')?['value'])?['accountid']

This returns empty string if the count is 0 else the value.


Hope this helps

--
Happy 365'ing
Gopinath

No comments:

Post a Comment