Skip to Content
author's profile photo Former Member
Former Member

Issues with Data Source loading on button click

Hi All,

I created a panel with few input fields and button.

My requirement is to filter data source using Input fields before loading the data source(Because of very large volume of data).

In Properties panel of Data Source, changed the DataBinding-->Load in Script to true.

Panel with Input fields:

I create the following script on the On click Button component(Apply Button).


DS_1.setFilter("0SALESORG", INPUTFIELD_1.getValue());

DS_1.setFilter("0SALES_OFF", INPUTFIELD_2.getValue());

DS_1.setFilter("0SALES_GRP", INPUTFIELD_3.getValue());

DS_1.setFilter("0SALES_DIST", INPUTFIELD_4.getValue());



But when i execute the application i am getting the errors " Data Sourece DS_1 is not initialized"

Getting the error because, before loading data source, i am passing the values to the data source!

Is there a way to filter data source before loading into the application. ?

Note: Dont want to use prompts in the data source.

Data Source: Bex

Design Studio 1.6 SP2

prompt page.PNG (7.5 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Aug 10, 2016 at 08:39 PM

    Hi Kumar,

    You MUST place the setFilter() calls immediately AFTER the loadDataSource() call. In this sequence, Design Studio knows to apply the filters BEFORE loading the result set. Otherwise you will receive the "not initialized error".



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.