DataSourceParameter Class Properties

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

Description

Use this property to set or return a Boolean value indicating whether it is allowed to change the required flag of this parameter.

This property is read/write.

Description

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

This property is read/write.

Description

This property returns a string representing the default value for a data source parameter for display purposes. This is the same as the DefaultValue property except that a date value is in the user-preferred format.

This property is read-only.

Description

Use this property to set or return the description of the data source parameter as a string.

This property is read/write.

Description

Use this property to set or return the table edit type of the data source parameter, 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

This property returns a string representing the evaluated value of the data source parameter. This is the same as the Value property except that a system variable is evaluated to its current runtime value.

This property is read-only.

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 this data source parameter as a string.

This property is read-only.

Description

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

This property is read/write.

Description

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

This property is read-only.

Description

Use this property to set or return a pointer to the DataSource object to which this parameter 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 as the prompt table.

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 whether this data source parameter is required, as a Boolean value.

This property is read/write.

Description

Use this property to set or return whether to skip validity checks of the values for this data source parameter, as a Boolean value.

This property is read/write.

Description

Use this property to set or return the usage type for this data source parameter as a string. The values are:

Value

Description

&utility.USAGETYPE_FIXED

This parameter takes a fixed value.

&utility.USAGETYPE_NOTUSED

This parameter is not used.

&utility.USAGETYPE_SYSVAR

This parameter gets its value from a system variable.

&utility.USAGETYPE_USERSPECIFIED

The value of this parameter can be specified by the user.

&utility.USAGETYPE_INTERNAL

This parameter is for internal use.

&utility.USAGETYPE_ADMINSPECIFIED

The value of this parameter can be changed only by users having administrator access to the data.

This property is read/write.

Description

This property returns the valid values (that is, the UserValues collection).

This property is read-only.

Description

Use this property to set or return the Utility object used by the DataSourceParameter 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:DataSourceParameter;
import PTFP_FEED:UTILITY:Utility;

Local PTFP_FEED:DataSource:DataSourceParameter &thisDSP;
Local PTFP_FEED:UTILITY:Utility &utility;

&thisDSP = create PTFP_FEED:DataSource:DataSourceParameter("dsp_ID", Null);
&utility = &thisDSP.Utility;
&thisDSP.Name = &thisDSP.ID;
&thisDSP.Description = MsgGetText(219, 3005, "Message Not Found - Max Entries");
&thisDSP.FieldType = &utility.FIELDTYPE_NUMBER;
&thisDSP.DefaultValue = "10";
&thisDSP.Value = &thisDSP.DefaultValue;
&thisDSP.Required = True;
&thisDSP.EditType = &utility.EDITTYPE_NOTABLEEDIT;
&thisDSP.PromptTable = ""; /* Should only use SQL Table or View */
&thisDSP.Range = Null; /* Only set the range if the edit type is translatable */
&thisDSP.UsageType = &utility.USAGETYPE_FIXED;
&thisDSP.UserValues = Null;
&thisDSP.AllowChangesToRequired = False;

Description

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

This property is read/write.

Description

This property returns a string representing the value for a data source parameter for display purposes. This is the same as the Value property except that a date value is in the user-preferred format.

This property is read-only.