cancel
Showing results for 
Search instead for 
Did you mean: 

Data Bound Components: Select characteristics like the Dimension Filter

Former Member
0 Kudos

Hi,

I am working at a data bound component.

I want the user to be able to choose a characteristic of the data source in the properites to display it with my component.

This should be similar to the standard component "Dimension Filter".

My problem is that I (and the sample component "Sample Table" as well) could only choose key figures (in the example: "Anzahl Sätze").

The characteristic (in the example: "Land") could not be chosen.

Do you have any suggestions how I could solve this problem?

Furthermore I am trying to get the values of some characteristics by using the metadata. Similar to the "Sample Table" I am using the statement "meta_data.dimensions[i] .members[k] .text".
The return value looks like: "Key | Description".

Are there some functions to divide them or do I have to use String-Operations?

Regards,

David

P.S.: I am rather new to this topic so I may not use all terms correctly, but I hope the pictures will clarify my problem.

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor
0 Kudos

Hi David,

To answer your questions:

1)  The standard Property Sheet does not provide a dimension selection dialogue for SDK components.  You need to perform the following steps:

(a)  Create an Additional Properties Sheet (APS) for your SDK component as described in the Design Studio SDK Developer Guide;

(b)  Use the CallRunTimeHandler function to call a function in the Component.js file that returns the result set meta data to the APS;

(c)  Display the available dimensions in a listbox or dropdown box in the APS so that the designer can select the required one.

2)  You need to apply your own JavaScript manipulation to parse the meta data dimensions.

Regards,

Mustafa.

Former Member
0 Kudos

Hi Mustafa,

thank you for your fast reply.

It is working fine.

Do you have an idea how I can update my property sheet at runtime?
If the dashboard designer changes the data source the options of my dropbox at the additional property sheet should be updated as well. There is no afterUpdate()-Event or something like that.

Regards,

David

MustafaBensan
Active Contributor
0 Kudos

Hi David,

Good to hear the suggested steps worked out.  Regarding the issue of recognising a data source change from the APS, I seem to recall discussing this with Mike Howles.  You may need to define a polling function in your APS which periodically executes a function in the Component.js via CallRuntimeHandler, to check for updates to the data-bound properties and return new meta data to the APS accordingly.

Regards,

Mustafa.

Former Member
0 Kudos

Hi Mustafa,

according to your suggestion I tried to realize a polling function. I used the JavaScript functions "setIntervall" and "setTimeout", but they both do not work. They start my method once but not periodically. Is there another function to solve my problem?

Regards,

David

MustafaBensan
Active Contributor
0 Kudos

Hi David,

Mike Howles describes an approach in this comment (point 2).  Perhaps that might be helpful.

Regards,

Mustafa.

mike_howles4
Active Contributor
0 Kudos

Yes there is no silver bullet to solve this.  Using the trick Mustafa mentioned will help, along with attaching logic to componentSelected as well will help.  I'd caution against polling on an interval as you eventually will trigger a JVM memory leak with too many callRuntimeHandler calls over and over.

Former Member
0 Kudos

Hi Mustafa, Hi Michael,

thank you for your help, it is working fine.

I am using the "componentSelected"-function, now.

Regards,


David

Answers (1)

Answers (1)

TammyPowlas
Active Contributor
0 Kudos

I am not an SDK expert but have you tried changing your BEx query or Edit > Initial View so it shows only text, not key?