cancel
Showing results for 
Search instead for 
Did you mean: 

Assign DataSource with initial view in script

former_member959294
Discoverer
0 Kudos

Hello!

I have a dashboard in Lumira Designer with multiple KPI tiles. Each tile is an instance of the same composite and gets assigned a DataSource by the dashboard application using the following interface function setDs(I_ds):

compositeDS.assignDataSource(I_ds.getInfo().system, DataSourceType.QUERY, I_ds.getInfo().queryTechnicalName);

After this command, the composite can use the DS. However, I configured an initial view for the DS in the dashboard app, and this view is being ignored by the composite. I tried to change the second parameter to DataSourceType.VIEW, but this results in errors and the DS not being loaded at all. I was unable to find any example of assigning DataSourceType.VIEW online.

I'd kindly appreciate any suggestions on how to transfer the initial view to the component.

former_member34
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you for visiting SAP Community to get answers to your questions. Since this is your first question, I recommend that you familiarize yourself with our Q&A Tutorial: https://developers.sap.com/tutorials/community-qa.html, as it provides tips for preparing questions that draw responses from our members. Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your profile you encourage readers to respond: https://www.youtube.com/watch?v=46bt1juWUUM

Many thanks!

Accepted Solutions (1)

Accepted Solutions (1)

reiner_hille-doering
Active Contributor

Hello Benjamin,

this is a valid question, but I'm afraid that there is no good answer. What you would need a is a kind of "copyState" API for data sources - which does not exist so far. The initial view contains many properties, for some we offer property getters and setters which would allow to copy (e.g. copyFilters), but unfortunately not for all.

Best regards,

Reiner.

former_member959294
Discoverer
0 Kudos

Thank you for your answer Reiner. We will then have to change the queries directly to the adequate form in query designer.

Answers (0)