# FolderListingAlgorithm

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Enums](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FolderListingAlgorithm/

Folder listing algorithm. Used to optimize property folder listings on intermediate view levels.

- **Full name:** `MFiles.FolderListingAlgorithm`
- **Proto file:** [`mfiles/enums.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/enums.proto)

<a id="values"></a>

## Values

| Name | Number | Description |
|---|---|---|
| <a id="v-FOLDER_LISTING_ALGORITHM_NONE"></a>`FOLDER_LISTING_ALGORITHM_NONE` | 0 | None i.e. no manual determination, use the program's own heuristics. If this is used, a folder listing algorithm is determined automatically. |
| <a id="v-FOLDER_LISTING_ALGORITHM_TEST_EACH_VALUE_WITH_SINGLE_QUERY"></a>`FOLDER_LISTING_ALGORITHM_TEST_EACH_VALUE_WITH_SINGLE_QUERY` | 1 | Tests each value (folder) separately but uses a single SQL query. |
| <a id="v-FOLDER_LISTING_ALGORITHM_GET_VALUES_BY_DISTINCT_USE"></a>`FOLDER_LISTING_ALGORITHM_GET_VALUES_BY_DISTINCT_USE` | 2 | Gets matching values (folders) based on their distinct use in the objects. |
| <a id="v-FOLDER_LISTING_ALGORITHM_TEST_EACH_VALUE_WITH_SEPARATE_QUERIES"></a>`FOLDER_LISTING_ALGORITHM_TEST_EACH_VALUE_WITH_SEPARATE_QUERIES` | 3 | Tests each value (folder) separately, uses a separate SQL query for each folder to be tested. |

<a id="used-in-fields"></a>

## Used in fields

- [`GroupingLevel.subfolder_algorithm`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.GroupingLevel/index.md#f-subfolder_algorithm): Folder listing algorithm used to determine matching property folders on this intermediate view level.
