On_Select userexit in widget- and edit-menus/button-areas or On_Event userexit in widget state or in query mode of mask edit state. Using as Pre_Mask userexit is possible too.
If a query returns more records than you defined for the current mask in the R-max field of the mask data list, DataView will cancel the query and enter the first part of the records into the mask. A corresponding message will appear. If the search was started with at least one database sort criterion set, the remaining records can be fetched via record-scan.
Example:
In DataView itself the userexit is used for the item fetch of the edit menu, which is offered in a mask after switching into query mode of mask edit state and after confirming the search terms entered.