cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing array elements?

murali_balreddy2
Active Participant
0 Kudos

In DS script, I can construct an array as

var myArray = ["AK", "AL", "AR"];

But how do I access the the array elements?

When I try the following it errors out

var myArrayElement = myArray[0];

Are there any methods available for array?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member131154
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Murali,

in Design Studio 1.1 it is definately not possible to work with arrays in the way you want to do it. So there is no way to read the nth element of an array. I also double checked with the development team.

Actually you can use an array like yours only for scenarios like to set a filter for a dimension or something like that.

Hopefully that will extend in the upcomming releases.

Regards

Dirk

murali_balreddy2
Active Participant
0 Kudos

Thanks for the information. Yes. That is what I figured out too.

I hope SAP release more datatype functions.

By the way, do you or your development team friends have documentation of BI Action Language (that is used for scripting). Or are we just limited to the script editor context help alone.

Thanks.

Murali

Former Member
0 Kudos

Hi Murali,

May be this will help you out. BIAL is a  subset of the JavaScript/ECMAScript standard.

http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

BR
Adlin

former_member131154
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Murali,

Admin send the link to the BIAL documentation, but not all the elements are available in DesignStudio.

For sure there will be a lots of enhancements for scripting in future releases, you will also find that within the roadmap.

Regards Dirk

murali_balreddy2
Active Participant
0 Kudos

Thanks Adlin. It talks about ECMA in general and not BIAL in particular. Looking for BIAL specific information - that is implemented in DS.

I just have to wait for the new features to be added.

Former Member
0 Kudos

Hi Murali,

Even I was searching for the same, & ended up with the above doc.

this helps a bit, but not.

Even i am bit struggling with the code part.

//Adlin

Answers (0)