Forum Discussion

ThorJensen's avatar
ThorJensen
New Contributor II
6 days ago
Solved

Purpose of itemName in Assembly Service factories?

Hi all

I'm trying to understand the purpose of the string 'itemName' variable that is available inside the assembly service factories.

Does anyone know the intended purpose of the 'itemName'?
And does anyone have some best practice guidelines or examples of this variable in use? 

Thank you very much everyone!
Thor

 

  • Depending on the Service, ItemName provides info on what invoked the ServiceFactory Service.  For example, for DynamicDimension, it is set to the invoking DimName.  For DynamicCube, it's set the invoking CubeName or ScenarioName.  ItemName is not set for every ServiceFactory type.  The ItemName parameter only appears to be available in the ServiceFactory, and not in the ServiceFiles you may attach to the ServiceFactory.  So, you can use ItemName in the event you need to invoke a different ServiceFile based on the invoking ItemName.

1 Reply

  • rhankey's avatar
    rhankey
    Contributor II

    Depending on the Service, ItemName provides info on what invoked the ServiceFactory Service.  For example, for DynamicDimension, it is set to the invoking DimName.  For DynamicCube, it's set the invoking CubeName or ScenarioName.  ItemName is not set for every ServiceFactory type.  The ItemName parameter only appears to be available in the ServiceFactory, and not in the ServiceFiles you may attach to the ServiceFactory.  So, you can use ItemName in the event you need to invoke a different ServiceFile based on the invoking ItemName.