Custom database structure
If you opt not to use the K2 Business Apps database that comes with the installer but want to use your own database you will need to make sure the configuration of the K2 Business Apps service broker points to SmartObjects that execute your own stored procedures. The app will download the structure as described below and uses that information to determine which projects, folders and forms the user sees.
Projects
A SmartObject call that returns all projects a user may access.
Inputs
FQN (varchar(max))
Outputs
ID (uniqueidentifier)
Name (varchar(100))
Headers (Folders)
A SmartObject call that returns all folders a user may access.
Inputs
FQN (varchar(max))
Outputs
ID (Guid)
Name (varchar(100))
Color (varchar(10))
FontAwesomeUnicode (varchar(6))
Forms
A SmartObject call that returns all forms a user may access.
Inputs
FQN (varchar(max))
Outputs
ID (uniqueidentifier)
Name (varchar(max))
DisplayName (varchar(100))
Description (varchar(max))
Color (varchar(10))
FontAwesomeUnicode (varchar(6))
FormParameters
A SmartObject call that returns the static form parameters.
Inputs
FQN (varchar(max))
Outputs
FormID (uniqueidentifier) (foreign key to Forms.ID)
Name (varchar(100))
Value (varchar(max))
FormConditions
A SmartObject call that returns the conditions that must be met before a form is visible in the app.
Inputs
FQN (varchar(max))
Outputs
FormID (uniqueidentifier) (foreign key to Forms.ID)
Name (varchar(100))
Value (varchar(max))
ProjectHeaders
A SmartObject call that returns the links between projects and headers: what project contains what header.
Inputs
FQN (varchar(max))
Outputs
ProjectID (uniqueidentifier) (foreign key to Projects.ID)
HeaderID (uniqueidentifier) (foreign key to Headers.ID)
HeaderHeaders
A SmartObject call that returns the links between headers and child headers.
Inputs
FQN (varchar(max))
Outputs
HeaderID (uniqueidentifier) (foreign key to Headers.ID)
ChildID (uniqueidentifier) (foreign key to Headers.ID)
ProjectForms
A SmartObject call that returns the links between projects and forms.
Inputs
FQN (varchar(max))
Outputs
ProjectID (uniqueidentifier) (foreign key to Projects.ID)
FormID (uniqueidentifier) (foreign key to Forms.ID)
HeaderForms
A SmartObject call that returns the links between headers and forms: what header contains what forms.
Inputs
FQN (varchar(max))
Outputs
HeaderID (uniqueidentifier) (foreign key to Headers.ID)
FormID (uniqueidentifier) (foreign key to Forms.ID)
FormFormTypes
A SmartObject call that returns what form falls into which category.
Inputs
FQN (avrchar(max))
Outputs
FormID (uniqueidentifier) (foreign key to Forms.ID)
FormType (int) (Task = 1, Draft = 2, App = 3, Menu Item = 6)