Forum Discussion

xfgethelp's avatar
xfgethelp
New Contributor II
2 days ago

Create dynamic members using api.ReadDynamicDimensionInfo

Hi,

I'm trying to create dynamic members within a dimension using api.ReadDynamicDimensionInfo.

I created a custom table within application database. When the service runs, it creates members under the root member even when I pass the "Parent" member's name. Also, the aggregation weight is being set to 0 even when I've passed numerical values.

Table:

Dimension Library: I want the members to be created under "All_Customers"

Code:

It works when I use - CreateAndAddrelationships but not with the api mentioned above. Am I doing something incorrect?

1 Reply

  • sameburn's avatar
    sameburn
    Icon for OneStream Employee rankOneStream Employee

    Hi xfgethelp​

    I think your issue might be that you are trying to create your dimension as an inherited dynamic dimension

    This means you have to observe extensibility and parent members in your source data must conform to real members in the Dimension you are inheriting. This is the same logic for physical dimensions 

    Not too clear what your structure looks like from your screenshot but I can tell by greyed out members it is inherited 

    CreateAndAddrelationships works better here because it is an overloaded method where we can stipulate type of parent child relationship e.g real or dynamic members based on source data and what we are trying to create in onestream 

    Hope this helps

    Sam