Table: dbo.Workpaper
This table contains the data that represents a document within an engagement binder.
Columns
Name | Type | Constraints | Description
workpaper_KEY | int (4) | NOT NULL | Primary key. This points to the workpaper.
known_application_type_KEY | int (4) | NOT NULL | Foreign key to the Known_Application_Type table. This points to the application for this extension.
locked_by__staff_KEY | int (4) |  | Foreign key to the Engagement_Binder_N_Staff table. When this has a value it points to the staff that has locked this workpaper. If there is no lock, then this will be null.
engagement_binder_KEY | int (4) | NOT NULL | Foreign key to the Engagement_Binder table. This tells what engagement this workpaper belongs too.
workpaper_status_KEY | int (4) | NOT NULL | Foreign key to the Workpaper_Status table. This states the workpapers current status.
workpaper_name | nvarchar (150) | NOT NULL | This is the name for the workpaper
workpaper_roll_forward_treatment_KEY | int (4) | NOT NULL | The required workpaper_reference column is a string used to describe the workpaper and defaults to the empty string.
delete_on_finalize | bit (1) | NOT NULL | The required delete_on_finalize column is a bit that allows us to tell whether or not we should delete the workpaper once it has been finalized.
workpaper_reference | nvarchar (50) | NOT NULL | The required workpaper_reference column is a string used to describe the workpaper and defaults to the empty string.
assigned_to__staff_KEY | int (4) |  | The assigned_to__engagement_binder_n_staff_KEY column is a foreign key linking to an assigned staff. Null if there is no assigned staff.
replace_template_id_guid | uniqueidentifier (16) |  | The replace_template_id_guid column is a guid key that represents a unique template ID used by PPC. This will be used to retrieve the document we want to replace this current workpaper with. Required when the workpaper roll forward treatment is -Replace from selected engagement- but otherwise is null.
parent_of_deleted_workpaper__engagement_binder_tree_item_KEY | int (4) |  | Contains the link to the engagement binder tree item that is associated with a deleted workpaper. This value is null if this workpaper is not deleted. This column does not have a foreign key constraint, however it is used like a nullable foreign key.
is_placeholder | bit (1) | NOT NULL | Determines if this particular record represents a short-term Workpaper. Placeholders ARE Workpapers, and therefore have all the abilities of any other Workpaper -- just a shorter lifespan.
formula_frozen_status_KEY | int (4) | NOT NULL | This fields indicates the workpapers formula frozen status.1 for Unfrozen, 2 FrozenByUser and 3 FrozenByApplication
ppc_smart_workpaper_metadata | varchar (-1) | NOT NULL | This column stores PPC SMART workpaper metadata. This information is passed to us from SMART. All SMART workpapers will have this information. When this column is empty, it is not a SMART workpaper.
ppc_smart_workpaper_id | nvarchar (72) | NOT NULL | This column stores PPC SMART workpaper id. This information is populated from the PPC_Context_ID value from SMART workpaper metadata. All SMART workpapers will have this information. When this column is empty, it is not a SMART workpaper.
is_smart_placeholder | bit (1) | NOT NULL | This column is used to indicates whether this workpaper is a Smart Placeholder document. When a PPC Smart document is rollforwarded into a new binder, we turn the document into a Smart Placeholder document. Once engagement from Smart Practice Aids is also rollforwarded, Smart Practice Aidscan replace Smart Placeholders with their real document.

Primary key
Name | Columns | Description
PK_Workpaper | workpaper_KEY |
Unique constraints
Name | Columns | Description
UK_Workpaper$engagement_binder_KEY$workpaper_name | engagement_binder_KEY, workpaper_name |
UK_Workpaper$engagement_binder_KEY$workpaper_reference | engagement_binder_KEY, workpaper_reference |

Foreign keys
Name | Columns | Referenced table | Description
FK_Workpaper__Engagement_Binder__engagement_binder_KEY | engagement_binder_KEY | Engagement_Binder (engagement_binder_KEY) |
FK_Workpaper__Known_Application_Type__known_application_type_KEY | known_application_type_KEY | Known_Application_Type (known_application_type_KEY) |
FK_Workpaper__Staff__assigned_to__staff_KEY | assigned_to__staff_KEY | Staff (staff_KEY) |
FK_Workpaper__Staff__locked_by__staff_KEY | locked_by__staff_KEY | Staff (staff_KEY) |
FK_Workpaper__Workpaper_Roll_Forward_Treatment__workpaper_roll_forward_treatment_KEY | workpaper_roll_forward_treatment_KEY | Workpaper_Roll_Forward_Treatment (workpaper_roll_forward_treatment_KEY) |
FK_Workpaper__Workpaper_Status__workpaper_status_KEY | workpaper_status_KEY | Workpaper_Status (workpaper_status_KEY) |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_Workpaper_N_File_Storage__Workpaper__workpaper_KEY | workpaper_KEY | Workpaper_N_File_Storage |
FK_Workpaper_Source_Ocr_Data__Workpaper__workpaper_KEY | workpaper_KEY | Workpaper_Source_Ocr_Data |
FK_Custom_Excel_Grid__Workpaper__workpaper_KEY | workpaper_KEY | Custom_Excel_Grid |
FK_Workpaper_Source_Document_Processing__Workpaper__workpaper_KEY | workpaper_KEY | Workpaper_Source_Document_Processing |
FK_PPC_Workpaper__Workpaper__workpaper_KEY | workpaper_KEY | PPC_Workpaper |
FK_Journal_Entry__workpaper_KEY | workpaper_KEY | Journal_Entry |
FK_BS_Workpaper__Staff__assigned_to_staff__Workpaper__workpaper_KEY | workpaper_KEY | BS_Workpaper__Staff__assigned_to_staff | Foreign key that references the workpaper_KEY column of the Workpaper table
FK_Engagement_Item_Note__Workpaper__workpaper_KEY | workpaper_KEY | Engagement_Item_Note |
FK_Workpaper_Signoff__Workpaper__workpaper_KEY | workpaper_KEY | Workpaper_Signoff |
FK_Recorded_Event_Object_N_Workpaper_Workpaper__workpaper_KEY | workpaper_KEY | Recorded_Event_Object_N_Workpaper |
FK_Engagement_Binder_Tree_Item__Workpaper__workpaper_KEY | workpaper_KEY | Engagement_Binder_Tree_Item |
FK_GL_Account_Workpaper_Reference__workpaper_KEY | workpaper_KEY | GL_Account_Workpaper_Reference |
FK_Journal_Entry_Distribution__workpaper_KEY | workpaper_KEY | Journal_Entry_Distribution |