cancel
Showing results for 
Search instead for 
Did you mean: 

dropdown component in sap design studio

12-16-2016 2:36 AM
1123 views 3 comments
0 Likes
SAP Managed Tags
Subscribe

in this case,I need to use dropdown component to chice year,inforchart can set month.if I select dropdown,the inforchart will show 12 month of that year,but I have a problem like follow picture.

if I have select 2 month of 2016 like picture one,and then I changed dropdown year to 2015,which will show 12 month date of 2015,all of then worked.But if I change to 2016 again while I haven't select any inforchart value in 2015,it shows like picture one where 2 month was select,if I want to clear it and no value select in inforchat like picture two ,how should I do?

I have tried this code in dropdown selection event,but false.

INFOCHART_1.clearSelection();

And I found the dropdown selection event have carried twice time.the original value of val=0;

if(val==1){
     val=0;
     APPLICATION.alert("1#"+DROPDOWN_1.getSelectedValue());
}else{
     val=1;
     APPLICATION.alert("2#"+DROPDOWN_1.getSelectedValue());
     APPLICATION.doBackgroundProcessing();
}

after I run it,the value shows :

APPLICATION.alert("2#"+DROPDOWN_1.getSelectedValue());

and then:

APPLICATION.alert("1#"+DROPDOWN_1.getSelectedValue());

So,how can I do to make the inforchart.clearselection() work, or how to clear the choice state; and how to avoid dropdown select event run twice time?

Thanks .

Jing.

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

wilson_yeung
Product and Topic Expert
Product and Topic Expert
0 Likes

Sometimes, the script interpreter tries to be smart and doesn't exactly process the script in the order we want it to.

Can you try putting the infochart.clearSelection() script in your background processing?

Dropdown onclick event script:

APPLICATION.doBackgroundProcessing();

Background Processing script:

INFOCHART.clearSelection();
Former Member
0 Likes

hey,Wilson.

I've tried what you said many times,but it still false.

I found it worked when I was use in a page,but when I change to another year,it false.

Thanks.

Jing