Custom Field: Sort Collection

Created by Maja Bradonjic, Modified on Thu, 1 Jun, 2023 at 3:45 PM by Ivana B

TABLE OF CONTENTS





1. What is the Sort Collection field?


The Sort Collection is an algorithm field that systematically organizes a collection of elements, such as numbers or strings, in a specific order. It operates by comparing and rearranging individual elements within the collection to produce a new, sorted arrangement. 

The sort can be performed in either ascending or descending order, depending on the user's preference. In ascending order, elements are arranged from the smallest to the largest, while in descending order, they are arranged from the largest to the smallest. 

The sorting process involves multiple iterations and comparisons, ensuring that each element is placed in its correct position relative to the other elements in the collection. This results in a structured, ordered output that is easier to analyze and understand



Note: In this article, we will be using WooCommerce integration as an example.

The Sort Collection field options may vary depending on the integration and the collections it contains.



Using this field, it is possible to manipulate the values of the following WooCommerce collections and automatically sort them in either ascending or descending order:

  • Images
  • Tags
  • Up-Sells
  • Cross-Sells
  • Product Attributes
  • Downloadable files






2. Sort Collection field Options



 2.1 Images



Sort by collections:


- Images/ ID

- Images/ URL

- Images/ Name

- Images/ Alt Text

- Images/ Position 



2.2 Tags


Sort by collections:

- Tags/ ID

- Tags/ Name



2.3 Up-sells



Sort by collections:

- Up-sells/UID



2.4 Cross-sells



Sort by collections:

- Cross-sells/UID



2.5 Product Attributes



Sort by collections:

- Product Attributes/ Name

- Product Attributes/ Visible

- Product Attributes/ Variation

- Product Attributes/ Options




2.6 Downloadable Files



Sort by collections:
- Downloadable Files/ Name

- Downloadable Files/ URL




With this, we will be ending our Sort Collection custom field article.


To check the list of the tools and features we support please click here!


If you don't see your favorite tool on our list, please take the time and send us the request here to create an integration for you or UP-vote if it's already on the list :) 


We develop integrations based on the requests and up-votes :) 


We hope that this covers everything. If you have any further questions or need additional clarification please reach out to us via [email protected] or our chat widget!



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article