DataSourceSetting Class Properties

In this section, the DataSourceSetting class properties are presented in alphabetical order.

Description

Use this property to set or return a string representing the default value for a data source setting.

This property is read/write.

Description

Use this property to set or return a Boolean value indicating whether the Value property is displayed as display only.

This property is read/write.

Description

Use this property to set or return the table edit type of the data source setting, as a number. The values are:

Numeric Value

Constant Value

Description

1

&utility.EDITTYPE_NOTABLEEDIT

This is the default edit type. A valid values list can be specified using the UserValues collection.

2

&utility.EDITTYPE_PROMPTTABLE

This data source parameter takes value from a prompt table. Only a SQL table or SQL view can be used as the prompt table.

3

&utility.EDITTYPE_TRANSLATETABLE

This data source parameter only takes values specific in the Range array of this data source parameter

4

&utility.EDITTYPE_YESNO

This data source parameter only takes a Yes or No value.

This property is read/write.

Description

Use this property to set or return a Boolean value indicating whether the setting is enabled.

This property is read/write.

Description

Use this property to set or return the field type as a number. The values are:

Numeric Value

Constant Value

Description

0

&utility.FIELDTYPE_CHARACTER

Character field

1

&utility.FIELDTYPE_LONGCHARACTER

Long character field

2

&utility.FIELDTYPE_NUMBER

Number field

3

&utility.FIELDTYPE_SIGNEDNUMBER

Signed number field

4

&utility.FIELDTYPE_DATE

Date field

5

&utility.FIELDTYPE_TIME

Time field

6

&utility.FIELDTYPE_DATETIME

DateTime field

This property is read/write.

Description

This property returns the ID for the data source setting as a string.

This property is read-only.

Description

Use this property to set or return the label of the name as a string.

This property is read/write.

Description

Use this property to set or return the name of the data source setting as a string.

This property is read/write.

Description

This property returns the object type for the data source setting as a string. For a DataSourceSetting object, this is a constant value: DataSourceSetting.

This property is read-only.

Description

Use this property to set or return a pointer to the DataSource object to which this setting belongs.

This property is read/write.

Description

Use this property to set or return the name of the prompt table as a string. Only a SQL table or SQL view should be used.

This property is read/write.

Description

Use this property to set or return the list of valid values as an array of array of string.

This property is read/write.

Description

Use this property to set or return a Boolean value indicating whether to call the parent DataSource object’s processSettingsChange method when the value changes.

This property is read/write.

Description

Use this property to set or return the related display field value as a string.

This property is read/write.

Description

Use this property to set or return a Boolean value indicating whether this data source setting is required.

This property is read/write.

Description

Use this property to set or return a Boolean value indicating whether to show the related display field.

This property is read/write.

Description

Use this property to set or return the Utility object used by the DataSourceSetting object. By default, the parent's (that is, the data source's) Utility object is used.

This property is read/write.

Example

import PTFP_FEED:DataSource:DataSourceSetting;
import PTFP_FEED:UTILITY:Utility;

Local PTFP_FEED:DataSource:DataSourceSetting &thisDSS;
Local PTFP_FEED:UTILITY:Utility &utility;

&thisDSS = create PTFP_FEED:DataSource:DataSourceSetting("dss_ID", Null);
&utility = &thisDSS.Utility;
&thisDSS.Name = &thisDSS.ID;
&thisDSS.LongName = "Data Type Name";
&thisDSS.FieldType = &utility.FIELDTYPE_CHARACTER;
&thisDSS.DefaultValue = "";
&thisDSS.RelatedFieldValue = "";
&thisDSS.EditType = &utility.EDITTYPE_PROMPTTABLE;
&thisDSS.PromptTable = Record.PTFP_DTYPE_PVW; /* Only use SQL Table or View */
&thisDSS.Range = Null; /* Only set the range if the edit type is translatable */
&thisDSS.Required = True;
&thisDSS.Enabled = True;
&thisDSS.Visible = True;
&thisDSS.DisplayOnly = False;
&thisDSS.ShowRelatedField = True;
&thisDSS.RefreshOnChange = True;

Description

Use this property to set or return the value of the data source setting as a string.

This property is read/write.

Description

Use this property to set or return a Boolean value indicating whether to show the Value field when it’s enabled.

This property is read/write.