Skip to main content
Contributor
October 15, 2024
Solved

Relationship properties - how to get stored items?

  • October 15, 2024
  • 2 replies
  • 0 views

Hello,

I'm trying to get all the stored items of Entity relationship properties, but w/o success. Any idea what I'm doing wrong?

Dim oVMProperties As New VaryingMemberProperties(DimType.Entity.Id, iChild, iParent)
Dim oVMPropertiesStoredItemsList As List(Of VaryingMemberPropertyItem) = oVMProperties.GetEntityRelationshipProperties().PercentConsolidation.GetStoredPropertyItems()

I'm expecting the list (row #2) for some use cases (relationships) should return > 0, and it seems to be always 0:

{sChild} under {sParent}: {oVMPropertiesStoredItemsList.Count} | {oVMProperties.GetEntityRelationshipProperties().PercentConsolidation.GetNumStoredPropertyItems()} | {oVMProperties.GetEntityRelationshipProperties().PercentConsolidation.HasStoredPropertyItems()}
None under Root: 0 | 0 | False
CONSOLID under Root: 0 | 0 | False
INACTIVE under Root: 0 | 0 | False
Global under Root: 0 | 0 | False
TOTAL_LE under CONSOLID: 0 | 0 | False
kwojsz_0-1728993752065.png
Best answer by rhankey

This is a sample of how I return all the stored values for let's say the Entity Relationship Text1 property:

Dim PropertyId As Integer=ChildRelationshipInfo.Properties.GetEntityRelationshipProperties.Text1.PropertyId

Dim MemberPropertyList As List(Of VaryingMemberPropertyItem)=ChildRelationshipInfo.Properties.Item(PropertyId).GetStoredPropertyItems

 

2 replies

Newcomer
October 15, 2024

have you tried this?

Dim bValue As Boolean = BRApi.Finance.Entity.InUse(si, entityId, varyByScenarioTypeId, varyByTimeId)

kwojszAuthor
Contributor
October 16, 2024

yes, that works, but it doesn't give me the number of stored items...

rhankeyAnswer
Newcomer
October 15, 2024

This is a sample of how I return all the stored values for let's say the Entity Relationship Text1 property:

Dim PropertyId As Integer=ChildRelationshipInfo.Properties.GetEntityRelationshipProperties.Text1.PropertyId

Dim MemberPropertyList As List(Of VaryingMemberPropertyItem)=ChildRelationshipInfo.Properties.Item(PropertyId).GetStoredPropertyItems

 

kwojszAuthor
Contributor
October 16, 2024

thanks! this is what i was looking for!