Use a Selection as a Parameter to Restrict the Row Set

Another common situation a developer will run into is the necessity to restrict the row set to a specified set of records. A selection is a set of record IDs for a particular record type. A selection can be a static list of record IDs, or it can be a dynamic list of record IDs that are derived when called upon by a business processSelections can be created using Blackbaud's query tool by first creating either an ad-hoc query or smart query and then saving the query results as a selectionSelections can also be created by other business processes. Check out the materials on query and selections within the Query and Export Guide if you are unfamiliar with either topic.

Different parameter sets can contain references to different selections which in turn affects the restriction of rows within the output of the business process. In short, a selection can be used to rows of data created by a business process.

After a parameter set is selected and a business process instance is started, the Infinity platform calls upon .NET code to process a set of records. Within the business process Visual Basic code, a base set of records may be restricted by the set of IDs defined by the Selection parameter. Below is an example where the Selection parameter is used within the join clause to filter the rows. A standard user-defined function named UFN_IDSETREADER_GETRESULTS is used to read the GUIDs from an IDSET (selection) in the database using the ID of the selection (IDSETID).

Figure: Restrict the rows using a JOIN clause and the selection parameter