--- title: "Limiting the Fetch Entities Step" slug: "limiting-the-fetch-entities-step" updated: 2021-03-12T15:05:24Z published: 2021-03-12T15:07:04Z canonical: "documentation.decisions.com/limiting-the-fetch-entities-step" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt > Use this file to discover all available pages before exploring further. # Limiting the Fetch Entities Step Example Lab ArticleWhile Example Lab projects are resources for public use, articles and assets are not actively maintained. Screenshots and features are from the specified version below. These references may become dated as new versions are released. --- ## Overview | ## Example Lab Details | | --- | | **Version** | 6.4.0 | | **Root Folder** | Example Lab - Fetch Entities | | **Modules** | None | | **Dependencies** | None | This Example Lab demonstrates how to limit the number of results acquired when using the Fetch Entities Step. --- ## Explanation In this example, the user can limit the number of results obtained by the **Fetch Entities Step** to a predetermined value. This is accomplished by using the **ForEach Step** to add the individual results of the Fetch Entities Step to a list. Once the Fetch Entities Step has run, the ForEach Step iterates through the results a predetermined number of times. Each time the next sequential entity obtained by the Fetch Entities step is added to a list using the **Add to List Step**. The ForEach Step is stopped by the Less Than or Equal to Rule which returns false and ends the flow when the item index reaches the user's preset value. Reference Articles[ForEach Step](https://documentation.decisions.com/docs/en/processing-lists-of-items-with-the-foreach-step) [Building a List](https://documentation.decisions.com/docs/23) [Rules](https://documentation.decisions.com/docs/en/creating-your-first-rule) [Fetch Entities Step](https://documentation.decisions.com/docs/en/retrieving-entities-with-the-fetch-entities-flow-step) ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/Screen%20Shot%202020-09-28%20at%2012.19.01%20PM.png) --- ## Project Download The examples attached were developed to be instructional and were not developed as officially supported components. For more information or to engage our service team to develop fully supported, production quality solutions, please contact services@decisions.com. Import the project below to a Decisions environment on version 6.4.0 or later using our [Importing/Exporting](https://documentation.decisions.com/docs/exporting-and-importing-overview) article. PENDING ---