Appends or updates line items for the specified cell. Line item data is passed in a Double array.
To pass line item data in a String array, use SetTextCellLineItems. |
<HsvData>.SetCellLineItems lScenario, lYear, lPeriod, lEntity, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, vardData, varbstrDetailsLong (ByVal). The member ID of the cell's Scenario dimension member. | |
Long (ByVal). The member ID of the cell's Year dimension member. | |
Long (ByVal). The member ID of the cell's Period dimension member. | |
Long (ByVal). The member ID of the cell's Entity dimension member. | |
Long (ByVal). The member ID of the cell's Account dimension member. Use HsvAccounts.UsesLineItems to check whether an account supports line items | |
Long (ByVal). The member ID of the cell's Intercompany Partner dimension member. | |
Long (ByVal). The member ID of the cell's Custom 1 dimension member. | |
Long (ByVal). The member ID of the cell's Custom 2 dimension member. | |
Long (ByVal). The member ID of the cell's Custom 3 dimension member. | |
Long (ByVal). The member ID of the cell's Custom 4 dimension member. | |
Double array (ByVal). An array of the line item data to be added, formatted according to the connected user’s preferences. | |
String array (ByVal). An array of the descriptions that identify the line items to be updated. |
The following example inserts data for line item descriptions named “Desks” and “Chairs”. The example assumes the variables passed to SetCellLineItems 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 daData(1) As Double, 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
daData(0) = 3497#
saDescs(0) = "Desks"
daData(1) = 10000.01
saDescs(1) = "Chairs"
cData.SetCellLineItems lScen, lYear, lPer, lEnt, lAcct, _
lICP, lCust1, lCust2, lCust3, lCust4, daData, saDescs