# Create a Dropdown of Properties for Sorting

You can use the ListBox function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. with the Get and GetPropertyNames functions to change the property, based on which sorting functions work, from a dropdown list. This section contains an example that you can follow to create a dropdown of object properties to modify the property the sorting functions use.

To set up a listbox for sorting, follow this example:

1. Copy and paste an array, for example, an array of blobs to an empty cell. In this case, it is B9:

   B9 = GetProperty($E$7, "blobs")

2. Use GetPropertyNames to get an array of property names from the array of blobs, and specify the level as 1. Use Get to take the first object of the array for GetPropertyNames:

   C9 = GetPropertyNames(Get(B9,0),1)

3. Use Listbox to get a listbox with the property names:

   D9 = Listbox(C9)

4. Because the Listbox returns the index of the items in it, use Get to get the string value of the property:

   E9 = Get(C9,D9)

5. Replace the original array that the getters reference by the SortDescending function. The SortDescending function references the array and the listbox result:

   B12 = SortDescending(B9,E9)

The following images show the results of the preceding procedure, where you can select the property that the sorting function uses from the dropdown :

Note:

- You can use these functions with any function that produces an array, even if that array is not a product of the Toolchain function.

- You can merge some of the functions into one cell. The example uses separate cells to better illustrate the process.