Sort your data within an attribute

Sort and organize your data within an attribute in Productsup.

If you have multiple items, for example, a list, in an attribute, you can sort them in a specific order.

Sort values in a descending or ascending order

You can use the sort values box to do basic sorting.

  1. Add the Sort Values box

  2. Define the delimiter which separates the items in your data

  3. Decide whether to order the values as descending or ascending

sort_values.png

The above settings would sort the following list in this manner -

input: fry,leela,hermes,bender,zoidberg,prof

output: bender,fry,hermes,leela,prof,zoidberg

Sort values using a predefined order

You can also sort the values in an attribute based on an order you define yourself, by using the sort values in the cell box. You can define an individualized order by adding a list of attributes on which to sort, or by adding regex patterns.

  1. Add the sort values in the cell box

  2. Define the delimiter which separates the items in your data

  3. Decide whether to order the values as descending or ascending - please note that if you define a list in the sort attribute, this order will be ignored

  4. Optionally, enter an individualized list under the sort attribute for which you should sort your values - one list entry per line

  5. Define the mode of this list; whether the values are strings to be sorted, or regex patterns to be matched and then sorted

If you add a list to sort by, then values from your data not in this list will be ordered by the first appearance.

sort_values_cell.png

The settings in the screenshot above would have the following effect -

input: L | XS | medium | small

output: small | medium | L | XS