Sort records in Cloud flows

In this blog we will see how we can sort list records in Cloud flows

Lets say we want to retrieve all accounts on created by ascending.

There are two ways to sort list of records in Cloud flows

  1. Order By –
  2. Fetch Xml –
  1. Order By –

Use List Records step in Common Data Service Connector where all you need to specify is field schema name and Order

Syntax – Schema_Name asc/desc

List records 
Entity name 
Select Query 
Filter Query 
Order 8}' 
Expand Query 
Fetch Xml Query 
Top Count 
Skip token 
Partition Id 
Accou n ts 
Limit the properties returned while retrieving data. 
An ODATA filter query to restrict the entries returned (e.g. stringCoIumn eq 'stri 
createdon asc 
Related entries to include with requested entries (default 
Fetch Xml query 
Total number of entries to retrieve (default = all). 
The skip token. 
= none). 
An option to specify the partitionld while retrieving data for NoSQL entities. 
Hide advanced options A

2.Fetch XML –

We can use Fetch XML to retrieve only the attribute that you need based on Condition that can be easily added using advanced find.

While adding condition we can specify the order in Fetch XML

  1. Click on Configure Sorting
Fine 
columns 
Group OR 
Zit 
for 
A cc nts 
v St—tus 
SEIect 
Edit Columns 
Edit columns for the saved view. These columns represent the data that mill be displayed in the view. 
Win 
displayed 
Custom Contmls 
Wting 
O Not 
too miry columns to it cn 
the will will 
Cancel

2. Add Sorting – Sort By -> Ascending Order

Edit Columns 
Edit columns for the 
Accunt 
O Note t 
Configure Sort Order 
Select the columns to sort on by default. 
On 
—ding Order 
Order 
C. Custom Contn21E 
C.nfgure 
Columns 
Change

 and then download Fetch XML.

Below is the downloaded Fetch XML –

Use this Fetch XML in Flow.

Hope this helps !

Published by Ankita Chavan

Software Engineer

Leave a comment

Design a site like this with WordPress.com
Get started