on 05-11-2015 1:44 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
Hi David,
Mike Howles describes an approach in this comment (point 2). Perhaps that might be helpful.
Regards,
Mustafa.
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.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.