Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel1
typeflat
separatorpipe
Page Properties
Description

Summary

The view shows all the changes applied to the Competence Documents from APP

Keywords

APP, Changes, Competence

Category

Personnel Portal

Description

“Changes to Competence Documents from APP” view is used to track all the changes applied to the Competence Documents from APP by the employees.

This view is essential for the admins to make sure that the uploaded data is accurate.

Selection

VIEWID should be substituted with the id of the crew list view that you are creating in your system e.g. PW001SRV20 etc.

Code Block
languagesql
CREATE VIEW dbo.PW001SRV200VIEWID AS

select
	p01.PIN,
	p01.NAME as Name,
	c06.TEXT as Document,
	p05.code as DocumentCode,
	p05.createtime as Created,
	case when p05.createdby = 'app' then p01.name end as CreatedBy,
	p05.changetime as Changed,
	case when p05.changedby = 'APP' then p01.name end as ChangesMadeBy,
	case when scanneddocno is NULL then 'Scan is missing' when p05.scanvalidity = 0 and scanneddocno is not NULL then 'Scan has not been approved' else 'Scan is valid' End as Status,
	p01.EMPLOYMENTENDDATE,
	p01.EMPLOYMENTSTARTDATE,
	p01.CLIENT NUMORGID

from pw001p05 p05
join pw001c06 c06 on c06.code = p05.code
join pw001p01 p01 on p01.PIN = p05.PIN

where 
((p05.CREATEDBY = 'APP' and p05.changedby IS NULL) or p05.CHANGEDBY = 'APP')
--and
--p05.SCANVALIDITY = 0

Field Specification

The view includes the following fields:

...

Column

...

Description

...

PIN

...

Name

...

Vessel

...

Document

...

DocumenCode

...

Created

...

CreatedBy

...

Changed

...

ChangesMadeBy

...

Status

...

EmploymentStart

...

EmploymentEnd

...

View Sample

...

Start Page Setup

Changed Competence