Forum Discussion

cap08's avatar
cap08
New Contributor III
9 days ago

What does api.Data.GetRelationshipChanges(dimensionName, startDate, endDate) return?

Hello, 

I already have a data file for cost centers and their Default values, but now I need to include the before and after changed values to the cost center member. 

I found this code: 

Function GetRelationshipChangesForTimeSpan(ByVal api As Api, ByVal dimensionName As String, ByVal startDate As DateTime, ByVal endDate As DateTime) As List(Of RelationshipChange)
    ' Initialize a list to store relationship changes
    Dim relationshipChanges As New List(Of RelationshipChange)

    ' Use the API to retrieve relationship changes
    relationshipChanges = api.Data.GetRelationshipChanges(dimensionName, startDate, endDate)

    ' Return the list of changes
    Return relationshipChanges
End Function

How can I tell what data it's actually returning, what columns? Is there a better way to do this?

Any help is greatly appreciated!

Thanks! 

 

2 Replies

  • JackLacava's avatar
    JackLacava
    Community Manager

    I don't know where you found that snippet, but it's nothing that would work on recent Onestream... 

     

    • DanielWillis's avatar
      DanielWillis
      Valued Contributor

      Maybe AI. It is great at giving you magical functions/APIs that you wished were true but don't exist 🤣