NGOAddDataDefinition

This call is used to add a new Data Class to the System. The fields of the Data-Definition can also be specified at the time of creation. This call can also be used to check only the existence of that Data-Definition. If the Data-Definition with the same name and same fields exists, then a Warning Code 50002 is returned and the existing Data-Definition is returned along with. If the User wants to limit the number of Fields, then Limit Count has to be specified in “LimitOnFieldCount” tag. If the User wants to limit the number of Data-Class, then Limit Count has to be specified in “LimitOnDataClassCount” tag.

 

Input Parameter description

View sample InputXml

Output Parameter description

View sample OutputXml

Errors and Warnings

 

 

Input Parameters description

Name

Parent Tag

Description

Valid Values

Default

Values

Option

Root

Unique option for the call.

NGOAdd

Data

Definition

 

CabinetName

Root

Name of the Cabinet to which the User wants to connect.

 

 

UserDBId

Root

UserDatabase ID that is returned in the NGOConnect

Cabinet call.

 

 

CheckExistence

Only

Root

Check the existence of the Data Definition.

Y or N

 

LimitOnField

Count    

Root

Maximum number of Fields that can be attached with a Data Class.

Integer >= 1

System does not check for any Limit.

LimitOnData

ClassCount

Root

Maximum number of Data Class that are possible with the current Data Class.

Integer >= 1

System does not check for any Limit.

DataDefinition

Root

It contains Information for a DataDefinition.

 

 

DataDefName

Data

Definition

Name of the Data Definition.

 

New Data

Class (Incremented no)

Comment

Data

Definition

Any Comment associated with the Data Definition.

 

 Blank

EnableLogFlag

Data

Definition

Maintain Log of the Data Class.

Y or N

N

Type

Data

Definition

Type of Data Class. Nothing predefined type is there.

ACT or Blank

Blank

GroupId

Data

Definition

Group Index associated with the Data Definition. It is reserved and User can use default value.

Integer >=0

0

Extra

Data

Definition

Extra information stored with the Data Definition

 

 

Fields

Data

Definition

It contains Information for a particular Field.

 

 

Field

Fields

It contains Information for a particular Field.

 

 

IndexId

Field

Index of the field.

Integer > 0

 

IndexName

Field

Name of the field.

 

New field (incremental no)

IndexType

Field

Type of the field.

Integer, Boolean, Date, Float, Long, String, Text, X (Document Index)

 

 

IndexLength

Field

Size of the field.

Depends upon Index type.

 

IndexAttribute

Field

Constraint of the field.

0 - null,

1 - not null

2 - unique null,

3 - unique not null

4,5 - same as 0,1 respectively except that they are search keys.

 

UsefulInfoFlag

Field

If a field is marked as Useful Info, value of that field can be seen in the document table under the Useful Data column, which makes the search faster.

Y or N

N

UsefulInfoSize

Field

Size of the field.

Depends upon the Index type.

0

IndexFlag

Field

Information about Index flag whether it would be Global or Data Class level.

Global or Data.

 

 

Output Parameters description

Name

Parent Tag

Description

Option

Root

Unique option for the call.

Status

Root

Status of the call. If the Status is 0, then the call is successful. Else if less than zero, error is reported. Else warning is reported.

DataDefinition

Root

Contains information about the Data field.

DataDefIndex

Data

Definition

Index of the added Data Definition, if not existed. Else existed Data Definition index.

DataDefName

Data

Definition

Name of the added Data Definition, if not existed. Else existed Data Definition name.

Comment

Data

Definition

Any Comment associated with the Data Definition.

EnableLogFlag

Data

Definition

Maintain Log of the Data Class.

Type

Data

Definition

Type of Data Class. Nothing predefined type is there.

GroupId

Data

Definition

GroupId of the newly added Data Definition.

Extra

Data

Definition

Extra information of the added Data Definition.

Fields

Data

Definition

Contains information about the fields of Data Class.

Field

Fields

Contain information about a particular field.

IndexId

Field

Index of the associated field.

IndexName

Field

Name of the associated field.

IndexType

Field

Type of the associated field.

IndexLength

Field

Size of the associated field.

IndexAttribute

Field

Attribute of the associated field.

UsefulInfoFlag

Field

UsefulInfoFlag of the associated field.

UsefulInfoSize

Field

UsefulInfoSize of the associated field.

IndexFlag

Field

Whether global or Data Class Level field info.

 

Errors returned from call

Code

Message

Comments

-50016

Group not found.

This error occurs while the User adds DataDef and if the specified Group does not exist.

 

-50031

Data Class with the same name already exists.

Data Definition with the given name already exists.

-50175

Limit on number of Data Class exceeded.

The number of Data Class in the System exceeds the value specified in < LimitOnDataClassCount>.

-50176

Limit on number of Fields exceeded.

The number of Data Fields specified in the Data Class exceeds the value specified in the input tag <LimitOnFieldCount>.

-50046

Invalid Field type.

Field Type is not valid. It should be of the type given in the input description.

-50106

Invalid Field attribute.

Field Attribute is not valid. It should be of the Attribute given in input description.

-50077

Specified Field already associated with Data Class.

Specified field is already associated with the Data Definition.

-50017

Insufficient privileges for the current operation.

Users do not have Privileges to add Data Definition.

-50074

Invalid parameters.

When a new field is to be created and its Field Name is specified as null.

-50047

Invalid Field length.

When a new field of type ‘S’ is to be created and its specified length is greater than 255.

-50077

Specified Field already associated with Data Class.

Specified Field already associated with Data Class.

-50096

Insufficient rights for the current operation.

User does not have Rights on fields that the User wants to associate with Data Class.

-50044

Global Index already exists.

This exception can come when User is associating a field of type ‘G’ which already exists in the System. All Global Indexes are unique in the System.

 

Warnings returned from call

Code

Message

Comments

50002

Data Class with the same name already exists.

The Data Class with the same Name and same Fields already exists.