Order by Selection

Returns a list of elements sorted in the order in which they were selected from the Select Elements panel.

Syntax & Usage

Order([List], CUSTOM)
  • Create the required list, making sure to select the member elements in the order you want them to appear in the list.
  • Connect the Order by Selection block to the list block; the Order by Selection block does not require any configuration.

Example

In this example, a list is created by the ordered selection of elements from the Manufacturer hierarchy, as seen in the Result Preview and Syntax Preview:

{Order({[manufacturers].[Manufacturer].[Adihash],[manufacturers].[Manufacturer].[Old Balance],[manufacturers].[Manufacturer].[Acme],[manufacturers].[Manufacturer].[Esics],[manufacturers].[Manufacturer].[Over Armour],[manufacturers].[Manufacturer].[Slicenger],[manufacturers].[Manufacturer].[Ribuck]},CUSTOM)}

When the list is added to a query, the elements appear in the given selection order: