Data Partitions

From SDU
Jump to: navigation, search
To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Overview

Data Partitions are subsets of the database with restricted access based on their content. A Data Partition restricts access with a defined set of constraints. The Data Partitions are associated with Contacts via their Access Type. For legacy purposes Data Partitions can also be associated with a Contact Record directly, however this is not a recommended method.

Controlled Tables

Constraints can only be created for tables in the Controlled Tables list. There is no GUI supported method of adding tables to the Controlled Tables list, but the process can be achieved via a data load.

Example load:<source lang="text">TABLE Controlled_Table

  del desc obj_name sym
  { "0" ,"Activity Log tables" ,"alg" ,"Act_Log" }
  { "0" ,"Change Activity Log tables" ,"chgalg" ,"Change_Act_Log" }
  { "0" ,"Issue Activity Log tables" ,"issalg" ,"Issue_Act_Log" }</source>

Constraint Types

  • Create - New records must satisfy this constraint before a save can be completed.
  • Defaults - Sets default values to be set on an empty field of a new record.
  • Delete - Specifies what records can be deleted by the user.
  • Pre-update - Identifies the records that can be updated by the user. Records not satisfying this constraint can only be view as read-only.
  • Update - Updated records must satisfy this constraint in order to be saved.
  • View - Identifies the records that can be viewed.

Example Constraints

Table Type Syntax Description
Act_Log Pre-Update id = 1 Prevents the update of Activities in the Request, Incident, and Problem Activity Log.*
ca_contact Pre-Update id = @root.id Only permit update of your own Contact Record.
ca_contact Pre-Update id = U'00' Prevent updating of any Contact.
ca_contact View last_name NOT LIKE 'KT%' Prevent display of any Groups beginning with the letters 'KT'
Call_Req Create customer = @root.id Allowing only the creation of tickets where you are the End User
Call_Req Default type = 'I' Create an Incident
Call_Req Default category = 'pcat:400001' Set a default Request/Incident/Problem Area
Call_Req Default group = U'807AEA15E8A2CF4ABF9181CBFEA12899' Set a default Group
Call_Req Delete id = 1 Prevent the deletion of any tickets
Call_Req Pre-Update customer = @root.id Allowing only the updating of tickets where you are the End User
Call_Req View customer = @root.id Allowing only the viewing of tickets where you are the End User
Change_Act_Log Pre-Update id = 1 Prevents the update of Activities in the CO Activity Log.*
Change_Request Create id = 1 Prevents the creation of a new Change Order
Cr_Status View code IN ('ACK','OP','RE','WIP') Display a set list of Status Options
prob_ctg View sym like 'Application' Display only the Application Areas
Workflow_Task Delete task != 'APP' Prevents the deletion of the Approval task.
Workflow_Task Delete status = 'WAIT' OR status = 'PEND' Prevents the deletion of completed tasks.
Workflow_Task View status != 'SKIP' Prevents view of the SKIP status.
ca_contact View (last_name NOT LIKE 'Group_Name') when we insert the above to access type; that access type wont be able to see the above group name
Call_Req View organization is null Allowing only the viewing of tickets where the organization is null
Call_Req Create customer.last_name NOT LIKE '%  %' Allowing ticket creation for contacts that don't have a certain string of characters in their last name