🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Column.MaxFetch
This page was created by Stephanie on 2023-05-18. Last edited by Wikiadmin on 2026-07-29.

You use Column.MaxFetch to limit how many rows a persistent-storage search returns, which is useful when you build search views such as a Seek form (web).

What Column.MaxFetch does

MaxFetch is a column setting that controls the maximum number of rows returned by a search against persistent storage. Persistent-storage searches are SQL searches.

Use MaxFetch when a search could otherwise return a large result set. Limiting the returned rows keeps the search result to a manageable size for the user and avoids fetching more rows than the view needs.

For example, if a user searches for customers using a broad value such as A, the search may match many stored customer rows. Set MaxFetch to 100 to return no more than 100 matching rows to the search result.

When to use it

Set MaxFetch on a search column when all of the following apply:

  • The ViewModel performs a search against persistent storage.
  • Users can enter broad search criteria or leave criteria sufficiently open to match many rows.
  • The view should show only a limited number of matching rows at one time.

A common use is a web seek form where the user searches for an object and selects a result. See Seek form (web) for the search-form context.

Configure a maximum result count

  1. Open the relevant ViewModel in MDriven Designer.
  2. Select the column used for the persistent-storage search.
  3. Set the column's MaxFetch value to the maximum number of rows that the search may return.
  4. Save the model and test the search with a broad criterion that matches more rows than the configured limit.

For example, with MaxFetch set to 50, a search that matches 500 stored rows returns at most 50 rows.

Choose an appropriate value

Choose a value that lets users find likely matches without returning an unnecessarily large result set.

Search scenario Example MaxFetch use
User selects one customer from a seek form Limit the result to a manageable list, such as 50 or 100 rows.
Search criterion is usually specific A smaller limit can be appropriate because the search normally returns few matches.
Search criterion can be broad Set a limit and encourage users to refine the criterion when the returned list is not sufficient.

Important behavior

MaxFetch limits the rows returned by the persistent-storage search. It does not make a broad search more specific. If the limit excludes a row the user needs, the user must refine the search criterion and search again.

Keep MaxFetch focused on result-count control. For other column attributes, see Documentation:Column.Texttype and Documentation:Precision.

See also