Share via


CatalogPropertiesDataSet

The CatalogPropertiesDataSet class contains all the attributes for a property in the Catalog System. You can access the DataRowCollection of the dataset’s data table by using the CatalogProperties property. You can access each row in the collection by using the CatalogPropertiesDataSet..::.CatalogProperty class.

This dataset contains all the built-in and user-defined property attributes. The following table contains the built-in properties for this dataset.

Property

Description

AssignAll

Gets or sets a Boolean value that specifies whether this property should automatically be assigned to all newly created product definitions.

BuiltIn

Gets or sets a Boolean value that specifies whether this property is a built-in property.

Currency

Gets or sets a string that specifies the currency to which this property belongs for catalog properties of the Currency data type; maximum length is 128 characters. This value is null if this property is accessed and it does not have a defined value.

DataType

Gets or sets an integer value that specifies the catalog data type for the property. This property is one of the values of the CatalogDataType enumeration. The possible values are as follows:

  • 0 - Integer

  • 1 - BigInteger

  • 2 - Float

  • 3 - Double

  • 4 - Boolean

  • 5 - String

  • 6 - DateTime

  • 7 - Currency

  • 8 - FilePath

  • 9 - Enumeration

  • 10 - Text

The Catalog System allows conversion of string properties to text properties.

DefaultBooleanValue

Gets or sets the default value for catalog properties of the Boolean data type.

DefaultCurrencyValue

Gets or sets a decimal value that specifies the default value for catalog properties of the Currency data type.

DefaultDateTimeValue

Gets or sets the default value for catalog properties of the DateTime data type.

DefaultDoubleValue

Gets or sets a double value that specifies the default value for catalog properties of the Float and Double data types.

DefaultIntegerValue

Gets or sets an integer that specifies the default value for catalog properties of the Integer and BigInteger data types.

DefaultStringValue

Gets or sets a string that specifies the default value for non-multilingual catalog properties of the String, Enumeration, and FilePath data types.

DisplayAsBase

Gets or sets a Boolean value that specifies whether this property is displayed as a base catalog property.

DisplayInProductsList

Gets or sets a Boolean value that specifies whether this property should be displayed in the list of products.

DisplayName

Gets or sets a string that specifies the non-multilingual display names for the catalog properties. An empty string is returned if this property is accessed and it does not have a defined value.

DisplayOnSite

Gets or sets a Boolean value that specifies whether the value of the catalog property in catalog categories and products should be displayed on the site.

ExportToDW

Gets or sets a Boolean value that specifies whether the contents of this property should be exported to the Data Warehouse for analysis and reporting.

IncludeInSpecSearch

Gets or sets a Boolean value that specifies whether a catalog property can be included in results that are returned from specification searches performed on categories.

IsFreeTextSearchable

Gets or sets a Boolean value that specifies whether a catalog property is free-text searchable. This property can be set only for catalog properties of String, Enumeration, FilePath, and Text data types.

IsRequired

Gets or sets a Boolean value that specifies whether this property should have a value when it is used in catalogs.

LanguageSensitive

Gets or sets a Boolean value that specifies whether this property is multilingual.

MaximumCurrencyValue

Gets or sets a decimal value that specifies the maximum value that can be defined for catalog properties of the Currency data type.

MaximumDateTimeValue

Gets or sets the maximum value that can be set for catalog properties of the DateTime data type.

MaximumDoubleValue

Gets or sets a double value that specifies the maximum value that can be set for catalog properties of the Float and Double data types.

MaximumIntegerValue

Gets or sets an integer that specifies the maximum value that can be set for catalog properties of the Integer and BigInteger data types.

MaximumStringLength

Gets or sets an integer that specifies the maximum length that can be defined for catalog properties of the String data type. The maximum length value for string properties cannot exceed 4000. For FilePath and Enumeration data types, this value is 256 and 128, respectively, and cannot be changed. For Text data types, this value is ignored.

MinimumCurrencyValue

Gets or sets a decimal value that specifies the minimum value that can be defined for catalog properties of the Currency data type.

MinimumDateTimeValue

Gets or sets the minimum value that can be set for catalog properties of the DateTime data type.

MinimumDoubleValue

Gets or sets a double value that specifies the minimum value that can be set for catalog properties of the Float and Double data types.

MinimumIntegerValue

Gets or sets an integer that specifies the minimum value for catalog properties of the Integer and BigInteger data types.

MinimumStringLength

Gets or sets an integer that specifies the minimum length that can be defined for catalog properties of the String data type. The minimum length value for string properties should be less than 4000. For Text, FilePath, and Enumeration data types, this value is 0 and cannot be changed.

PropertyName

Gets a string that specifies the name of the property in the Catalog System; maximum length is 128 characters.

Timestamp

Gets a binary value that specifies the last time that the row was updated. This property is for internal use only.

In addition to the built-in properties, the CatalogPropertiesDataSet class also contains user-defined attributes that can be added to the Catalog System. The following table contains the user-defined attributes for this dataset.

Property

Description

u_defaultvalue_<Language identifier>

Contains default values for multilingual catalog properties of the String, FilePath, and Enumeration data types in the language specified by <Language identifier>. For example, the column u_defaultvalue_en-US contains the default values for String, Enumeration, and FilePath catalog properties for the language "en-US".

DisplayName_<Language identifier>

Contains the display names for the catalog properties in the language specified by <Language identifier>. For example, the column DisplayName_en-US contains the display names for the properties in the language "en-US".

Constraints

The CatalogPropertiesDataSet class defines a unique constraint on the PropertyName property.

Using the CatalogPropertiesDataSet Class

The following example demonstrates how to access the properties of the CatalogPropertiesDataSet class.

public static void UseDataset(CatalogContext context, string propertyName, string displayName)
{
    // Create a new property and add attributes.
    CatalogProperty catalogProperty = catalogContext.CreateProperty(propertyName, CatalogDataType.String, 10);
    CatalogPropertiesDataSet catalogProperties = catalogProperty.Information;
    CatalogPropertiesDataSet.CatalogProperty propertyInfo = catalogProperties.CatalogProperties[0];
    propertyInfo.DisplayName = displayName;
    propertyInfo.LanguageSensitive = true;
    propertyInfo.IsFreeTextSearchable = true;
    propertyInfo.MaximumStringLength = 10;
    propertyInfo.MaximumStringLength = 100;
    propertyInfo["u_defaultvalue_en-US"] = "DefaultValue in en-US";
    // Save the new property to the Catalog System.
    catalogProperty.Save();
    // Iterate through the dataset and access each property.
    foreach(CatalogPropertiesDataSet.CatalogProperty catalogPropertyInfo in catalogContext.GetProperties().CatalogProperties)
    {
        string propertyName = catalogPropertyInfo.PropertyName;
        CatalogDataType dataType = (CatalogDataType)catalogPropertyInfo.DataType;
    }
} 

The CatalogPropertiesDataSetSchema Class

The CatalogPropertiesDataSetSchema class provides constants for all the built-in columns in the dataset and defines all the associated methods. The following table contains the associated methods for this class.

Method

Description

IsReadOnlyColumn

Returns true if the columnName in the dataset cannot be updated, or false if the columnName in the dataset can be updated.

IsBuiltInColumn

Returns true if the columnName is a built-in column in the dataset, or false if the columnName is a user-defined property.

See Also

Other Resources

Typed Datasets in the Catalog System