Skip to Content
0
May 22, 2018 at 08:42 AM

Lumira Designer: Assign a DataSource with a property/ Data Source is not initialized

1818 Views

Hi Community,

I created a composite "HEADER". The composite has the information icon which shows the query information. The application developer can set the data source in the properties with the property "p_DataSource".

Furthermore I have the global variable "myDataSource".

In the script "On Property Change" of the HEADER composite I implemented the following BIAL-Code.

myDataSource= p_DataSource.getInfo().queryTechnicalName;
APPLICATION.alert(myDataSource);
DS_1.assignDataSource("cuid:AWcmTpN1Y4lBnKRNFXLOCtU", DataSourceType.QUERY, myDataSource);
DS_1.loadDataSource();

So, now in the application it is possible to select a DataSource of the application for the HEADER composite. The assigned DataSource is named DS_1.

After click on icon information some information appears with DS_1

TEXT_DIALOG_APP_INFO.setHtmlText(" ");


/* Application Information */
TEXT_DIALOG_APP_INFO.setHtmlText(" ");
TEXT_DIALOG_APP_INFO.setHtmlText(TEXT_DIALOG_APP_INFO.getHtmlText() + "<div class=\"myHtmlTextBold\">" + TEXT_POOL.Query + "</div>" + "<div class=\"myHtmlText\">" + DS_1.getInfo().queryDescription + '  [' + DS_1.getInfo().queryTechnicalName + ']' + "</div>"  + "<br>");
TEXT_DIALOG_APP_INFO.setHtmlText(TEXT_DIALOG_APP_INFO.getHtmlText() + "<div class=\"myHtmlTextBold\">" + TEXT_POOL.InfoProvider + "</div>" + "<div class=\"myHtmlText\">" + DS_1.getInfo().infoProviderDescription + '  [' + DS_1.getInfo().infoProviderTechnicalName + ']' + "</div>"  + "<br>");
TEXT_DIALOG_APP_INFO.setHtmlText(TEXT_DIALOG_APP_INFO.getHtmlText() + "<div class=\"myHtmlTextBold\">" + TEXT_POOL.LastDataUpdate +  "</div>" + "<div class=\"myHtmlText\">" + DS_1.getInfo().lastDataUpdate + "</div>"  + "<br>");
TEXT_DIALOG_APP_INFO.setHtmlText(TEXT_DIALOG_APP_INFO.getHtmlText() + "<div class=\"myHtmlTextBold\">" + TEXT_POOL.LastChangedAt +  "</div>" + "<div class=\"myHtmlText\">" + DS_1.getInfo().lastChangedAt + "</div>"  + "<br>");
TEXT_DIALOG_APP_INFO.setHtmlText(TEXT_DIALOG_APP_INFO.getHtmlText() + "<div class=\"myHtmlTextBold\">" + TEXT_POOL.LastChangedBy +  "</div>" + "<div class=\"myHtmlText\">" + DS_1.getInfo().lastChangedBy + "</div>"  + "<br>");
TEXT_DIALOG_APP_INFO.setHtmlText(TEXT_DIALOG_APP_INFO.getHtmlText() + "<div class=\"myHtmlTextBold\">" + TEXT_POOL.LastRefresh +  "</div>" + "<div class=\"myHtmlText\">" + DS_1.getInfo().lastRefreshedAt + "</div>" + "<br>");


But when I run the application and click on the information icon the following error message appears

DataSource DS_1 is not initialized. I don't understand it because I assigned and loaded the DataSource after I select on in the application.

Does everyone has an idea:

System information: Lumira Designer 2.1 SP1 Patch1

Tested in the local mode

Best regards

Patrick

Attachments

p-datasource.png (6.1 kB)