Skip to Content
avatar image
Former Member

dropdown component in sap design studio

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 16, 2016 at 09:17 PM

    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();
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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