Adding attributes to Text components in SAP Lumira Designer
In this blog post, I will show you how to add values from attributes on dimensions to text components in SAP Lumira Designer, and how this can be useful when designing Dashboards without needing assistance from the IT Department.
Usually, when we associate content from a BW datasource, we use the function, getData or getDataAsString – and we are able to add content of the keyfigure to the text box.
If we use the function, getDimensionsText we are able to add the text of the Dimension (but not Dimension-members) to the text box
So instead we need to be creative:
We start by adding a filter to the datasource, so we know there is only 1 dimension member for the relevant dimension, in this example it is 0PROFIT_CTR.
Then we create a variable “var” and adds the members of the dimesion “0PROFIT_CTR”, we are actually creating an array with only 1 member.
To extract the values of the dimension-member in our array, we create a “For-loop”
Inside the for loop, we have the option of getting the following data:
This means, that we can filter on a Profit Center in our report, and put in which Plant have been maintained in masterdata into our text-box which is called TEXT_FOOTER_TITLE
So in real life this can be used to show content in text-boxes without having the IT Department creating navigational attributes, or it could be a quick way of extracting the external key of a dimension member if this is needed to test for.