Skip to main content
June 17, 2025
Solved

Purpose of itemName in Assembly Service factories?

  • June 17, 2025
  • 1 reply
  • 1 view

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



 

Best answer by rhankey

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

rhankeyAnswer
June 17, 2025

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.