Skip to Content
0

dropdown component in sap design studio

Dec 16, 2016 at 01:36 AM

132

avatar image

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.

10 |10000 characters needed characters left characters exceeded

I've solved dropdown run twice problem as following this:

https://archive.sap.com/discussions/thread/3882295

but how to make inforchart.clearSelection() work with dropdown select event.

1
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Wilson Yeung
Dec 16, 2016 at 09:17 PM
0

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();
Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0