EP - 13 | COLLECTION SORT ELEMENT | LIGHTNING FLOW SERIES3

 


What is Collection Sort Element?

So as we all know we have an element in flow which is Get Record Element from which we can get records from objects and there is sorting option also which gives us Asc and Desc sorting. But, what if we want to sort more? what if we want to select how many rows we want to show?
Let say we have 1000 n records but want to show only 50 of them then?
For that we have a new element which is Collection Sort Element.

Use Case :
Get Contacts from database and sort it by Id then AccountId and then CreatedDate and fetch 100 contacts only.

Step 1 : Get Record Element - We will first create a new flow and take a get record element to get all the records from the contact object. 


Step 2 : Take Collection Sort Element - Now let's take collection sort element and sort the get records collection according to our use case.




In this collection sort element first we have added our get record collection. Then for sorting we have added all of the three sorting and for maximum number of records we have added 100.

Here is how the full flow looks :

To check out the full video tutorial, Please see the link below :


If you have any question please leave a comment below.

If you would like to add something to this post please leave a comment below.
Share this blog with your friends if you find it helpful somehow !

Thanks
Let's learn and grow together.
Love and Peace! 🧡

Post a Comment

0 Comments