on 2025 Apr 09 2:31 PM
Hello everyone,
I'm currently working on a scripted button in SAP Analytics Cloud (SAC) to dynamically set values for a variable using the setVariableValue() method. While this works perfectly for a single interval, I’m encountering issues when trying to set multiple intervals at once.
For example, I’d like to set the variable to include the following ranges:
1000–1999
3000–3999
6000–6999
However, when I execute the following script, only the last interval (6000–6999) is applied.:
Chart_1.getDataSource().setVariableValue("HRHN_SAC", {
from: "1000",
to: "1999",
from: "3000",
to: "3999",
from: "6000",
to: "6999",
exclude: false
});
It seems that SAC is overwriting the previous values and retaining only the final one.
Am I missing something here? Is there an alternative approach to pass multiple intervals to a variable in a single script?
Any guidance would be greatly appreciated.
Best Regards,
Feras
Request clarification before answering.
Dear @Feras,
I'm not an expert in this area, but you might want to try something like below:
Chart_1.getDataSource().setVariableValue("HRHN_SAC", [
{from: "1000",to: "1999",exclude: false},
{from: "3000",to: "3999",exclude: false},
{from: "6000",to: "6999",exclude: false}
]);Maybe this helps
Best regards
Susanne
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.