Navigation:  Document >

Documents and their attributes

Previous  Top  Next

Overview

This command will list the documents, its attributes, and the related values.

 

Related tables

Table

Description

Primary key (PK)

Connection tables

DCDOCREVISION

Document

CDDOCUMENT

CDREVISION

 

DCDOCUMENTATTRIB

ADATTRIBUTE

ADATTRIBVALUE

DCDOCUMENTATTRIB

Document attribute

CDATTRIBUTE

CDREVISION

DCDOCREVISION

ADATTRIBUTE

Attributes

CDATTRIBUTE

DCDOCUMENTATTRIB

ADATTRIBVALUE

List of values

CDATTRIBUTE

CDVALUE

ADATTRIBUTE

DCDOCUMENTATTRIB

 

Oracle/Postgres/SQL Server

SELECT  DR.IDDOCUMENT, 
      DR.NMTITLE, 
      ATT.NMLABEL, /*NOTE1*/
      DCATT.NMVALUE, /*NOTE2*/
      DCATT.DTVALUE, /*NOTE3*/
      DCATT.VLVALUE, /*NOTE4*/
      ATTV.NMATTRIBUTE,  /*NOTE5*/
      DCATT.DSVALUE, /*NOTE6*/
      ATTV.DTATTRIBUTE,/*NOTE7*/
      ATTV.VLATTRIBUTE,/*NOTE8*/
      DCATT.FGREQUIRED,/*NOTE9*/
      DCATT.FGREADONLY /*NOTE10*/   FROM DCDOCREVISION DR 
   INNER JOIN DCDOCUMENTATTRIB DCATT ON DR.CDREVISION = DCATT.CDREVISION
   INNER JOIN ADATTRIBUTE ATT ON DCATT.CDATTRIBUTE = ATT.CDATTRIBUTE
   LEFT OUTER JOIN ADATTRIBVALUE ATTV ON ATTV.CDATTRIBUTE = ATT.CDATTRIBUTE AND ATTV.CDVALUE = DCATT.CDVALUE AND DR.FGCURRENT = 1 /*NOTE11*/
ORDER BY IDDOCUMENT

 

Notes

1: The ATT.NMLABEL field displays the name of the attribute related to the document.

2: The DCATT.NMVALUE field will display a value if the attribute has a value of the indeterminate text type filled out in the document;

3: The DCATT.DTVALUE field will display a value if the attribute has a value of the indeterminate date type filled out in the document;

4: The DCATT.VLVALUE field will display a value if the attribute has a value of the indeterminate numeric type filled out in the document;

5: The ATTV.NMATTRIBUTE field will display a value if the attribute has a value of the list of values text type filled out in the document;

6: The DCATT.DSVALUE field will display a value if the attribute has a value of the text type (4000 characters) filled out in the document;

7: The ATTV.DTATTRIBUTE field will display a value if the attribute has a value of the list of values text type filled out in the document;

8: The ATTV.VLATTRIBUTE field will display a value if the attribute has a value of the list of values text type filled out in the document;

9: The DCATT.FGREQUIRED field indicates whether the attribute is required to be filled out in the document (value =1 required);

10: The DCATT.FGREADONLY field indicates whether the attribute can be filled out in the document data (value =1 indicates that it cannot be filled out and it will be disabled);

11: The DR.FGCURRENT field indicates whether the document record is the current revision (value =1 current).

 

Fields used on the view screen

 

document-02

 

#

Field ID

Type

Description

1

DR.IDDOCUMENT

VARCHAR(50)


2

DR.NMTITLE

VARCHAR(255)


3

DCATT.FGREQUIRED

NUMERIC(2) NULL

1-Yes

2-No

4

DCATT.DTVALUE

DATETIME NULL


5

DCATT.VLVALUE

NUMERIC(28,12) NULL


6

DCATT.NMVALUE

VARCHAR(255) NULL


7

DCATT.DSVALUE

TEXT NULL


8

ATTV.NMATTRIBUTE

VARCHAR(255) NULL


9

ATTV.VLATTRIBUTE

NUMERIC(28,12) NULL


10

ATTV.DTATTRIBUTE

DATETIME NULL


11

DCATT.FGREADONLY

NUMERIC(2) NULL

1-Yes

2-No