Scripting documentation
If the shared data source is connected as a data source, all scripts that change or filter the database must be executed on the shared data source. The measures and dimensions appear as empty on the individual components if no data source is directly connected. Which in turn is necessary in order to utilize the speed advantage of the shared data source.
In addition to the standard SAC scripting methods, the following methods are available:
Method | Description | Example |
---|---|---|
getMember | Returns the member info object from a member ID. Use this instead of getDataSource().getMember() to get the member info without sending a backend request. | console.log(SharedDatasource_1.getMember('Product', 'Apple juice')); Returns the id and description of the given member. Useful if you need the description of specific members. |
getMembers | Returns all member info objects for a dimension ID. Use this instead of getDataSource().getMembers() to get the member infos without sending a backend request. | console.log(SharedDatasource_1.getMembers('Product')); Returns an array of members of the dimension Product and outputs this to the console. |