Salesforce

Def/Null (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Def/Null (Magic xpa 3.x)

The following properties appear in the Def/Null section:

Null Allowed

Lets you specify whether the end user can enter a NULL value into a table column. When creating a new table, the NULL constraint is derived from this property. The NULL default is derived from the DBMS section in the Magic.ini file.

Yes means that all columns based on this class (database columns or virtual variables in programs) accept NULL as a valid value. In runtime, the Null Allowed property lets the end user enter a NULL value into a field before it is passed to the database.

No means that Magic xpa rejects NULL values on all columns based on this class. The default value is No.

Null Value

The calculation of the NULL value specifies the value that should be used when this column contains a NULL value, and could be used in expressions.

Input to the Null Value property is permitted only if the Null Allowed property is set to Yes. The NULL is used only when the application’s Null Arithmetic property is set to use default values. The Null Value property is optional.

Null Display

Set this property to Yes to alert the user to the presence of a NULL value in the variable, using a display string.

Input to the Null Display property is permitted only if the Null Allowed property is set to Yes. The Null Display property is optional.

Null Default

Determines whether a Null value or the default value will be assigned to the variable or column.

Yes – Null is the default value.

No – The default value property will be used.

Default Value

The default value assigned to the NULL column.

Note that for XML data sources, only non-inherited default values are considered when writing the element to the XML. Therefore, in order to send zero ('0') as a default value, you need to break the inheritance of this property.

This property is optional.

Database Default

The default value for the Database Default column in the database or the field. If a program creates a record and does not select the Database Default column, then the RDBMS will assign the default value.

Magic xpa loads the database default to access the table definition. If the default is a constant, Magic xpa also loads the default database into the Default Value property to serve as the default database for Magic xpa.

When creating a new table, Magic xpa adds this string to the CREATE TABLE statement as the default value for that column. For example, when you create a database default ‘defvalue’ in an MSSQL table, Magic xpa generates the following: CREATE TABLE owner1.table1 (Col1 CHAR(10) NOT NULL DEFAULT ‘defvalue’)

Magic xpa adds this string without any additional formatting to the CREATE TABLE statement.

Reference
Attachment 
Attachment