Use a dynamic query to find one or more records in the database. The found records are the input for further processing.
You can use a dynamic query on a Data Entry Workflow template SQL trigger assignment.
To define a query range, you can use a function.