Previous Topic: Adding Project ID to the SharedData and Restrict Variables

Next Topic: Restricting the Display of Tasks

Defining Restrictor Processing

When end users use the wizard, they add a project in the first part, and then add tasks for that project in the second part. The second part uses the Edit function scoped to Task, which contains a list of Task records. This list should not include all of the tasks for all of the projects. Instead, only the tasks you are adding for the new project entered in the first part should appear.

The functionality you set up to accomplish this is called restrictor processing because it restricts database access functions so they only display the records associated with a particular key value—in this case, the primary key of the project.

Adding restrictor processing involves three steps:

  1. Informing Task.Edit that you only want it to display the tasks owned by a specific project.
  2. Specifying which project’s tasks you want it to display.
  3. Calling the database access function that returns the list of tasks with the right Project ID.

To use a restricted BlockFetch function:

  1. If you do not have a Model Editor open, open one.
  2. Drag Task.Edit from the Object Browser to the body of the Model Editor.
  3. Add the following triple:
    Task.Edit replaces FNC Task.Fetch.BlockFetch
             ...by Task.Fetch.BlockFetchSet
    

    (Make sure you select the replaces FNC verb.)

    BlockFetch is a function that selects all the rows defined by the Task Fetch view. The triple you just entered tells CA Plex to use a different version of the BlockFetch function. BlockFetchSet only reads a specific set of rows.