# MTParamTableDefinition

This object describes the meta data for an MTRuleSet.

To view an object model diagram that includes MTParamTableDefinition, click here.

## Program ID

Metratech.MTParamTableDefinition.1

## Methods

Save | Saves modifications to this object in the database, including all condition and action meta-data.
AddConditionMetaData | Creates a new condition column in a parameter table.
AddActionMetadata | Creates a new action column in a parameter table.
CreateRateSchedule | Creates a new rate schedule in the parameter table with a given price list and priceable item template. A subsequent MTRateSchedule Save() will insert it into the database.
GetRateSchedule | Returns a rate schedule for this parameter table given its ID.
GetRateScheduleAsRowset | Returns a rowset of all ICB and non-ICB rate schedules in this parameter table.
GetNonICBRateScheduleAsRowset | Returns a rowset of all non-ICB rate schedules in this parameter table.
GetRateScheduleByPriceListAsRowset | Returns a rowset of all rate schedules in this parameter table for a given price list.

## Properties

Properties | Returns all (core and extended) properties of this object as a collection of MTProperty objects.
IndexedProperty | For parameter tables for aggregate charges: identifies the property that specifies the tiers.
DisplayName | The localized name shown to user.
ID | The unique (database) identifier of this object.
Name | The name shown to users.
ConditionHeader | The name to show as the header for the condition columns in a rate schedule.
ActionHeader | The name to show as the header for the action columns in a rate schedule.
HelpURL | The URL pointing to the appropriate Help page.
ConditionMetaData | The metadata that describes the condition columns in a rate schedule.
ActionMetaData | The metadata that describes the action columns in a rate schedule.
DBTableName | The name of database table that the rule set is stored in.

# Method Detail

## Save

This method saves modifications to this object in the database, including all condition and action meta-data.

### Visual Basic Syntax

Save()

### C++ Syntax

HRESULT Save();

## AddConditionMetaData

This method creates a new condition column in a parameter table.

### Visual Basic Syntax

AddConditionMetaData() As MTConditionMetaData

### C++ Syntax

HRESULT AddConditionMetaData([out, retval] IMTConditionMetaData * * pVal);

## AddActionMetadata

This method creates a new action column in a parameter table.

### Visual Basic Syntax

AddConditionMetaData() As MTConditionMetaData

### C++ Syntax

HRESULT AddConditionMetaData([out, retval] IMTConditionMetaData * * pVal);

## CreateRateSchedule

This method creates a new rate schedule in the parameter table with a given price list and priceable item template. A subsequent MTRateSchedule Save() will insert it into the database.

### Visual Basic Syntax

CreateRateSchedule(PriceListID As Long, PrcItemTmplID As Long) As MTRateSchedule

### C++ Syntax

HRESULT CreateRateSchedule([in] long aPriceListID, [in] long aPrcItemTmplID, [out, retval] IMTRateSchedule * * apSchedule);

## GetRateSchedule

This method returns a rate schedule for this parameter table, given its ID.

### Visual Basic Syntax

GetRateSchedule(ScheduleID As Long) As MTRateSchedule

### C++ Syntax

HRESULT GetRateSchedule(long aScheduleID, [out, retval] IMTRateSchedule * * apSchedule);

## GetRateScheduleAsRowset

This method returns a rate schedule for this parameter table, given its ID.

### Visual Basic Syntax

GetRateSchedulesAsRowset() As MTRowSet

### C++ Syntax

HRESULT GetRateSchedulesAsRowset([out, retval]IMTRowSet** apRowset);

## GetNonICBRateScheduleAsRowset

This method returns a rowset of all ICB and non-ICB rate schedules in this parameter table.

### Visual Basic Syntax

GetNonICBRateSchedulesAsRowset() As MTRowSet

### C++ Syntax

HRESULT GetNonICBRateSchedulesAsRowset([out, retval]IMTRowSet** apRowset);

## GetRateScheduleByPriceListAsRowset

This method returns a rowset of all non-ICB rate schedules in this parameter table.

### Visual Basic Syntax

GetRateSchedulesByPriceListAsRowset(PricelistID As Long, PITemplate As Long) As MTRowSet

### C++ Syntax

HRESULT GetRateSchedulesByPriceListAsRowset(long aPricelistID, long aPITemplate, [out, retval]IMTRowSet** apRowset);

# Property Detail

## Properties

This property returns all (core and extended) properties of this object as a collection of MTProperty objects.

### Visual Basic Syntax

Property Properties As MTProperties

### C++ Syntax

HRESULT Properties([out, retval] IMTProperties **pVal);

## IndexedProperty

For parameter tables for aggregate charges, this property identifies the property that specifies the tiers.

### Visual Basic Syntax

Property IndexedProperty As String

### C++ Syntax

HRESULT IndexedProperty([out, retval] BSTR *pVal);

HRESULT IndexedProperty([in] BSTR newVal);

## DisplayName

This property specifies the localized name shown to user.

### Visual Basic Syntax

Property DisplayName As String

### C++ Syntax

HRESULT DisplayName([out, retval] BSTR *pVal);

HRESULT DisplayName([in] BSTR newVal);

## ID

This property specifies the unique identifier of this object.

### Visual Basic Syntax

Property Property ID As Long

### C++ Syntax

HRESULT ID([out, retval] long *pVal);

HRESULT ID([in] long newVal);

## Name

This property specifies the name shown to users.

### Visual Basic Syntax

Property Name As String

### C++ Syntax

HRESULT Name([out, retval] BSTR *pVal);

HRESULT Name([in] BSTR newVal);

## ConditionHeader

This property specifies the name to show as the header for the condition columns in a rate schedule.

### Visual Basic Syntax

Property ConditionHeader As String

### C++ Syntax

HRESULT ConditionHeader([out, retval] BSTR *pVal);

HRESULT ConditionHeader([in] BSTR newVal);

## ActionHeader

This property specifies the name to show as the header for the action columns in a rate schedule.

### Visual Basic Syntax

Property ActionHeader As String

### C++ Syntax

HRESULT ActionHeader([out, retval] BSTR *pVal);

HRESULT ActionHeader([in] BSTR newVal);

## HelpURL

This property specifies the URL that points to the appropriate Help page.

### Visual Basic Syntax

Property HelpURL As String

### C++ Syntax

HRESULT HelpURL([out, retval] BSTR *pVal);

HRESULT HelpURL([in] BSTR newVal);

## ConditionMetaData

This property specifies the metadata that describes the condition columns in a rate schedule.

### Visual Basic Syntax

Property ConditionMetaData As MTCollection

### C++ Syntax

HRESULT ConditionMetaData([out, retval] IMTCollection * *pVal);

## ActionMetaData

This property specifies the metadata that describes the action columns in a rate schedule.

### Visual Basic Syntax

Property ActionMetaData As MTCollection

### C++ Syntax

HRESULT ActionMetaData([out, retval] IMTCollection * *pVal);

## DBTableName

This property specifies the name of database table that the rule set is stored in.

### Visual Basic Syntax

Property DBTableName As String

### C++ Syntax

HRESULT DBTableName([out, retval] BSTR *pVal);

HRESULT DBTableName([in] BSTR newVal);