Skip to Content
0

Setting Default Values of Dropdown in SAP Design Studio

Dec 14, 2016 at 08:01 PM

1.4k

avatar image
Former Member

Hi,

We have a requirement in Design Studio where chart will change according to Dropdown selection.

Below is the scenario

Dropdown 1—Values are A1, B1

Dropdown 2 – Values are A2, B2

These values are static and are not coming from datasource. We are assigning them to dropdowns and making A1 and A2 as default respectively.

There are four charts for above four combinations of Dropdowns (A1A2, A1B2, B1A1, B1 B2)

and we have used property setVisible true/false using If condition logic for dropdowns.

But when we execute the dashboard then correct chart is not coming for Default selection that is A1 A2 chart. When we change the dropdown values then correct chart is showing up.

But for landing page of dashboard, it is not working. Ideally it should show the chart for default selection of dropdown.

At Application level—on startup property we have used below code as mentioned in some threads, but it didn’t help.

Dropdown1.setSelectedValue(“A1”);

Dropdown2.setSelectedValue(“A2”);

Please suggest

Thanks

Vaishali

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Mustafa Bensan Dec 15, 2016 at 05:54 AM
0

Hi Vaishali,

If I have understood correctly, you chart visibility logic is scripted in the "On Select" event of the dropdown boxes. If this is the case, the issue is that the "On Select" event does not get triggered for default values, nor is it triggered when you execute setSelectedValue(). Try the following approach:

1) Remove the setSelectedValue() statements from the "On Startup" script as they have no effect since you have already set the dropdown defaults in the properties;

2) Manually trigger the execution of the dropdown "On Select" script in the "On Startup" event with the following code:

DROPDOWN_1.onSelect();
DROPDOWN_2.onSelect();

Regards,

Mustafa.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks a lot. This worked :)

Regards

Vaishali

1
Tammy Powlas
Dec 14, 2016 at 08:14 PM
0

Hello - see this thread: https://answers.sap.com/questions/64570/set-dropdown-default-value-false-in-design-studio.html - if that doesn't answer it, please share some screen shots to better assist.

Share
10 |10000 characters needed characters left characters exceeded