====== pears.WPKViewItem ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Woodpecker View Item definitions.
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **WPKViewItemID** | char(50) | NOT NULL | | |
| **WPKViewID** | char(50) | NOT NULL | | |
| **WPKFormID** | char(50) | NOT NULL | | |
| Name | char(50) | NULL | | |
| ItemType | char(20) | NOT NULL | | DataField,Combo,EditCombo,LookupCombo,CheckList,RadioList,CheckBox,SpinEdit,Question,Phone,Concatenated,View,PanelControl,Button,Ellipsis |
| DataType | char(1) | NULL | | String, Date, Time, Integer, Number, timestamP, Memo |
| DataLength | smallint | NULL | | For String fields |
| Notes | long varchar | NULL | | |
| SortOrder | smallint | NULL | | Orders the items in a view |
| CanView | char(100) | NULL | | Literal boolean or switch |
| CanEdit | char(100) | NULL | | Literal boolean or switch. If blank inherits from view |
| Required | char(50) | NULL | | Literal boolean or switch |
| DefaultValue | char(50) | NULL | | Connection Attributes e.g C_Unique, C_Date, C_Time, C_DateTime, C_UserID, C_LoginName, L_literal or other switch |
| Mask | char(50) | NULL | | Literal string or switch. Use *! for uppercase |
| DisplayFormat | char(50) | NULL | | Literal string or switch - applies to numbers, dates, times etc but not strings |
| Descriptor | long varchar | NULL | | table.column, sql expression, control name, button command, view id, concatenation expression, Questions- taglocation;tagid;id {} substitutions apply |
| ComplexDataUpdateCommand | long varchar | NULL | | update table set.... or call chgdata(.... Uses normal params + ::Value and for checklists also ::CheckListID |
| PickList | long varchar | NULL | | Literal string or switch. For Combo,EditCombo,LookupCombo,CheckList,RadioList |
| CheckValues | char(20) | NULL | | For CheckBox and CheckList checked;unchecked Default 1;0 |
| Sortable | tinyint | NULL | 0 | 0 no, 1 yes, 2 default order (The first 2 is the starting order otherwise the first 1) |
| SortExpression | char(100) | NULL | | Default is the column itself |
| BackColour | char(100) | NULL | | Literal integer or switch. If blank inherits from view |
| FontColour | char(100) | NULL | | Literal integer or switch. If blank inherits from view |
| CaptionBackColour | char(100) | NULL | | Literal integer or switch. If blank inherits from view |
| CaptionFontColour | char(100) | NULL | | Literal integer or switch. If blank inherits from view |
| Image | char(50) | NULL | | For buttons. Literal string or switch pointing to the wpkimageid |
| Indent | smallint | NULL | 0 | Controls indent levels in Inspectors and also the left indent on controls like buttons |
| DisplaySize | smallint | NULL | 10 | Col width for Grids, cell height for inspectors, width for buttons |
| Expanded | char(50) | NULL | | Literal boolean or switch. Expanded state of inspector node. Blank for NO and leave unchanged on refresh |
| IDforVideoRecordType | char(50) | NULL | | Marks this column as the ID to be used to respond to a video movement request for this record type |
| ComboScript | long varchar | NULL | | Button script executed on combo close up |
| ButtonGroup | smallint | NULL | | Set >0 for stay down buttons. If >=100 then AllowAllUp is set - useful for individual state buttons |
===== Primary Key =====
* WPKViewItemID, WPKViewID, WPKFormID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| ViewK | WPKViewID, WPKFormID | [[database:tables:pears_wpkview|pears.WPKView (WPKViewID, WPKFormID)]] | NOT NULL; ON DELETE CASCADE |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
* No indexes found.
===== Triggers =====
^ Name ^ Timing ^ Event ^
| TrackViewItemChange | after | insert,delete,update order 1 |
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."WPKViewItem"
-- Table comment: Woodpecker View Item definitions.
-- Statement count: 32
CREATE TABLE "pears"."WPKViewItem" (
"WPKViewItemID" char(50) NOT NULL
,"WPKViewID" char(50) NOT NULL INLINE 50 PREFIX 8
,"WPKFormID" char(50) NOT NULL INLINE 50 PREFIX 8
,"Name" char(50) NULL
,"ItemType" char(20) NOT NULL
,"DataType" char(1) NULL
,"DataLength" smallint NULL
,"Notes" long varchar NULL
,"SortOrder" smallint NULL
,"CanView" char(100) NULL INLINE 100 PREFIX 8
,"CanEdit" char(100) NULL INLINE 100 PREFIX 8
,"Required" char(50) NULL
,"DefaultValue" char(50) NULL
,"Mask" char(50) NULL
,"DisplayFormat" char(50) NULL
,"Descriptor" long varchar NULL
,"ComplexDataUpdateCommand" long varchar NULL
,"PickList" long varchar NULL
,"CheckValues" char(20) NULL
,"Sortable" tinyint NULL DEFAULT 0
,"SortExpression" char(100) NULL
,"BackColour" char(100) NULL INLINE 100 PREFIX 8
,"FontColour" char(100) NULL INLINE 100 PREFIX 8
,"CaptionBackColour" char(100) NULL INLINE 100 PREFIX 8
,"CaptionFontColour" char(100) NULL INLINE 100 PREFIX 8
,"Image" char(50) NULL
,"Indent" smallint NULL DEFAULT 0
,"DisplaySize" smallint NULL DEFAULT 10
,"Expanded" char(50) NULL
,"IDforVideoRecordType" char(50) NULL
,"ComboScript" long varchar NULL
,"ButtonGroup" smallint NULL
,PRIMARY KEY ("WPKViewItemID" ASC,"WPKViewID" ASC,"WPKFormID" ASC)
)
go
COMMENT ON COLUMN "pears"."WPKViewItem"."ItemType" IS
'DataField,Combo,EditCombo,LookupCombo,CheckList,RadioList,CheckBox,SpinEdit,Question,Phone,Concatenated,View,PanelControl,Button,Ellipsis'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."DataType" IS
'String, Date, Time, Integer, Number, timestamP, Memo'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."DataLength" IS
'For String fields'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."SortOrder" IS
'Orders the items in a view'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."CanView" IS
'Literal boolean or switch'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."CanEdit" IS
'Literal boolean or switch. If blank inherits from view'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."Required" IS
'Literal boolean or switch'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."DefaultValue" IS
'Connection Attributes e.g C_Unique, C_Date, C_Time, C_DateTime, C_UserID, C_LoginName, L_literal or other switch'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."Mask" IS
'Literal string or switch. Use *! for uppercase'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."DisplayFormat" IS
'Literal string or switch - applies to numbers, dates, times etc but not strings'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."Descriptor" IS
'table.column, sql expression, control name, button command, view id, concatenation expression, Questions- taglocation;tagid;id {} substitutions apply'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."ComplexDataUpdateCommand" IS
'update table set.... or call chgdata(.... Uses normal params + ::Value and for checklists also ::CheckListID'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."PickList" IS
'Literal string or switch. For Combo,EditCombo,LookupCombo,CheckList,RadioList'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."CheckValues" IS
'For CheckBox and CheckList checked;unchecked Default 1;0'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."Sortable" IS
'0 no, 1 yes, 2 default order (The first 2 is the starting order otherwise the first 1)'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."SortExpression" IS
'Default is the column itself'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."BackColour" IS
'Literal integer or switch. If blank inherits from view'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."FontColour" IS
'Literal integer or switch. If blank inherits from view'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."CaptionBackColour" IS
'Literal integer or switch. If blank inherits from view'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."CaptionFontColour" IS
'Literal integer or switch. If blank inherits from view'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."Image" IS
'For buttons. Literal string or switch pointing to the wpkimageid'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."Indent" IS
'Controls indent levels in Inspectors and also the left indent on controls like buttons'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."DisplaySize" IS
'Col width for Grids, cell height for inspectors, width for buttons'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."Expanded" IS
'Literal boolean or switch. Expanded state of inspector node. Blank for NO and leave unchanged on refresh'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."IDforVideoRecordType" IS
'Marks this column as the ID to be used to respond to a video movement request for this record type'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."ComboScript" IS
'Button script executed on combo close up'
go
COMMENT ON COLUMN "pears"."WPKViewItem"."ButtonGroup" IS
'Set >0 for stay down buttons. If >=100 then AllowAllUp is set - useful for individual state buttons'
go
COMMENT ON TABLE "pears"."WPKViewItem" IS
'Woodpecker View Item definitions.'
go
ALTER TABLE "pears"."WPKViewItem"
ADD NOT NULL FOREIGN KEY "ViewK" ("WPKViewID" ASC,"WPKFormID" ASC)
REFERENCES "pears"."WPKView" ("WPKViewID","WPKFormID")
ON DELETE CASCADE
go
create trigger "TrackViewItemChange" after insert,delete,update order 1 on
"pears"."WPKViewItem"
referencing new as "itm"
for each row
begin
call "WPKTrackChange"('F',"itm"."WPKFormID")
end
go
COMMENT TO PRESERVE FORMAT ON TRIGGER "pears"."WPKViewItem"."TrackViewItemChange" IS
{create trigger TrackViewItemChange
after insert,delete,update order 1 on
WPKViewItem
referencing new as itm
for each row
begin
call WPKTrackChange('F',itm.WPKFormID)
end
}
go