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

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s