Forum Discussion

kwojsz's avatar
kwojsz
New Contributor III
3 months ago

Relationship properties - how to get stored items?

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
  • 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
    
    

     

  • 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
    
    

     

    • kwojsz's avatar
      kwojsz
      New Contributor III

      thanks! this is what i was looking for!

  • pranav46's avatar
    pranav46
    Contributor II

    have you tried this?

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

    • kwojsz's avatar
      kwojsz
      New Contributor III

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