org-scn-design-studio-community / lumiradesignercommunityext

Lumira Designer SCN Community Extensions
Apache License 2.0
3 stars 2 forks source link

ComponentManager list all DataSources returns null reference #40

Open pschulz2905 opened 6 years ago

pschulz2905 commented 6 years ago

Hello guys,

first thanks for your amazing Lumira extensions!

While using the Component Manager funtion listAllDataSources I receive a null reference exception.

Here is my coding:

//Set Filter to all Data Sources
var components = COMPONENTMANAGER_1.listAllDataSources();
components.forEach(function(element, index) {
  APPLICATION.log("Data Source: "+element.name);
  element.datasource.setFilter(ip_dimension, ip_value);
});

On runtime I receive the following error message:

Message: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "setFilter" of undefined (GLOBAL_SCRIPTS.setGlobalFilters()#6) Stack trace: com.sap.ip.bi.zen.rt.framework.jsengine.JsEngineException: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "setFilter" of undefined (GLOBAL_SCRIPTS.setGlobalFilters()#6)

If you need the complete stack trace please tell me.

In my eyes it seems that the reference to the data source is not filled and thus the datasource cannot be adressed.

Thanks in advance for your help, Patrick