cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop "Filter Collection" from sorting the result by default.

MeghalVasa
Level 3
I have a collection with one column data as below: (Collection In = Lines) |------------------------------------------| Field Name = Line (Text) Name                Microsoft OneDrive for Business Publisher           Microsoft Corporation Status              New Name                McAfee Endpoint Security Web Control Publisher           McAfee, Inc. Status              Enabled Name                Send to OneNote Publisher           Not Available Status              Disabled |------------------------------------------| Now I want to convert this to a (Name|Status) collection, so I first filter the collection by Name & then by Status & then merge the 2 collections to obtain something like below: (This works fine except the entries misalign as they get sorted alphabetically by default within "Filter Collection" stage which is not desired) |-----------------------------------|-------| Name (Text) | Status Text) Microsoft OneDrive for Business  | New McAfee Endpoint Security Web Control | Enabled Send to OneNote | Disabled |-----------------------------------|-------| The Collection manipulation -> Filter Collection stage is given in snapshot has Collection In as "Lines" above & the Filter is given as "[Line] LIKE '%Name%'" The inbuilt VBO "Filter collection" is by default given the filtered output in a new Collection in a sorted order like below |------------------------------------------| Line (Text) McAfee Endpoint Security Web Control Microsoft OneDrive for Business  Send to OneNote |------------------------------------------| but I need it in the order of Collection In as it is... Unsorted. How do I do it? Whys is the "Collection Manipulation" -> "Filter Collection"  VBO Sorting the filtered result alphabetically by default when there is already another action of "Sore Collection" already present in same VBO? Please tell me how to change the default behavior of this VBO to not sort the Output Collection. What changes I can do or which is easiest way to fix this.   Pasted from
1 REPLY 1

VaibhavGarg
Level 2
Hello @Meghal, I don't think applying filter is an option. We should iterate existing collection to skip ""Publisher"" and insert a row in result collection in the combination of ""name"" and ""Status"". I create a sample flow without exception handling refer to screenshot. Ask in case you need to know what values are supplied in any stage internally. Note: I picked exact 9 values as you specified for input and output is displayed in screen.