SetTextCellLineItems

Appends or updates line items for the specified cell. Line item data is passed in a String array.

Tip:

To pass line item data in a Double array, use SetCellLineItems.

Syntax

<HsvData>.SetTextCellLineItems lScenario, lYear, lPeriod, lEntity, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, varabstrData, varabstrDetails

Argument

Description

lScenario

Long (ByVal). The member ID of the cell's Scenario dimension member.

lYear

Long (ByVal). The member ID of the cell's Year dimension member.

lPeriod

Long (ByVal). The member ID of the cell's Period dimension member.

lEntity

Long (ByVal). The member ID of the cell's Entity dimension member.

lAccount

Long (ByVal). The member ID of the cell's Account dimension member.

Tip:

Use HsvAccounts.UsesLineItems to check whether an account supports line items.

lICP

Long (ByVal). The member ID of the cell's Intercompany Partner dimension member.

lCustom1

Long (ByVal). The member ID of the cell's Custom 1 dimension member.

lCustom2

Long (ByVal). The member ID of the cell's Custom 2 dimension member.

lCustom3

Long (ByVal). The member ID of the cell's Custom 3 dimension member.

lCustom4

Long (ByVal). The member ID of the cell's Custom 4 dimension member.

varabstrData

String array (ByVal). An array of the line item data to be added, formatted according to the connected user’s preferences.

varabstrDetails

String array (ByVal). An array of the descriptions that identify the line items to be updated.

Example

The following example inserts data for line item descriptions named “Desks” and “Chairs”. The example assumes the variables passed to SetTextCellLineItems have been set to the cell’s member IDs, and then uses UsesLineItems to test whether the cell’s Account dimension member supports line items. If line items are supported, the line item data is added.

Dim saData(1) As String, saDescs(1) As String, cData As HsvData
Dim cAccounts As HsvAccounts, bLineItems As Boolean
'g_cSession is an HsvSession object reference
Set cData = g_cSession.Data
'g_cMetadata is an HsvMetadata object reference
Set cAccounts = g_cMetadata.Accounts
'Exit if the account does not support line items
cAccounts.UsesLineItems lAcct, bLineItems
If bLineItems = False Then Exit Sub
saData(0) = 3497#
saDescs(0) = "Desks"
saData(1) = 10000.01
saDescs(1) = "Chairs"
cData.SetTextCellLineItems lScen, lYr, lPer, lEnt, lAcct, _
    lICP, lCust1, lCust2, lCust3, lCust4, saData, saDescs