Normalized Flow Outcome Details (with division and user lookups)
CREATE VIEW vwflowoutcomedetails AS (
SELECT fod.id,
fod.name,
fod.description,
fod.divisionid,
dd.name AS divisionname,
fod.operationid,
CASE
WHEN (fod.operationcomplete = '1'::"bit") THEN true
WHEN (fod.operationcomplete = '0'::"bit") THEN false
ELSE NULL::boolean
END AS operationcomplete,
fod.userid,
ud.name AS username,
fod.clientid,
fod.errormessage,
fod.errorcode,
fod.actionname,
fod.actionstatus,
fod.updated
FROM ((flowoutcomedetails fod
LEFT JOIN divisiondetails dd ON (((fod.divisionid)::text = (dd.id)::text)))
LEFT JOIN vwuserdetail ud ON (((fod.userid)::text = (ud.id)::text)))
)| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| id | varchar(255) | true | Flow Outcome ID | |||
| name | varchar(255) | true | Flow Outcome Name | |||
| description | varchar(255) | true | Flow Outcome Description | |||
| divisionid | varchar(50) | true | Division ID | |||
| divisionname | varchar(50) | true | Division Name | |||
| operationid | varchar(50) | true | Operation ID | |||
| operationcomplete | boolean | true | Operation Complete | |||
| userid | varchar(50) | true | User ID | |||
| username | varchar(200) | true | User Name | |||
| clientid | varchar(50) | true | Client ID | |||
| errormessage | varchar(255) | true | Error Message | |||
| errorcode | varchar(50) | true | Error Code | |||
| actionname | varchar(50) | true | Action Name | |||
| actionstatus | varchar(50) | true | Action Status | |||
| updated | timestamp without time zone | true | Last Updated Timestamp |
| Name | Columns | Comment | Type |
|---|---|---|---|
| public.flowoutcomedetails | 13 | Flow Outcome Details | BASE TABLE |
| public.divisiondetails | 5 | BASE TABLE | |
| public.vwuserdetail | 18 | User details with manager and division context | VIEW |