- Home
- Forum
- JavaScript - EJ 2
- Accessing dimension values in Field List
Accessing dimension values in Field List
Is it possible to get a collection of all values available for a dimension from the field list, without a user first having to expand that item?
I've looked through the olapEngineModule for the field list but cannot find what I'm looking for.
For example I have a 'Mode' dimension, I want to be able to get all available modes using JavaScript.
Thanks!
SIGN IN To post a reply.
7 Replies
SN
Sivamathi Natarajan
Syncfusion Team
March 26, 2020 03:09 PM UTC
Hi Harry,
Thanks for contacting Syncfusion support.
We regret you to let you know that the requirement couldn’t be achievable in pivot table control. Because, we are fetching the members of a field dynamically when needed to avoid the performance lags. And, we won’t fetch all the members of fields on initial rendering.
Regards,
Sivamathi.
HS
Harry Shotter
April 2, 2020 12:57 PM UTC
Hi Sivamathi,
Thanks for your response.
As an alternative, is there a way to trigger this for a particular dimension?
Thanks,
Harry.
SN
Sivamathi Natarajan
Syncfusion Team
April 3, 2020 10:37 AM UTC
Hi Harry,
Kindly use the method “getCalcChildMembers” to fetch the members of a specific hierarchy level from server. Here, you should pass below parameters as follows,
- dataSourceSettings
- level unique name of the specific hierarchy
Follow below code example.
Code Example:
|
button.element.onclick = function () {
fieldlistObj.olapEngineModule.getCalcChildMembers(fieldlistObj.dataSourceSettings, "[Date].[Fiscal].[Date]");
console.log(fieldlistObj.olapEngineModule.calcChildMembers);
}; |
Meanwhile, we have prepared sample for your reference.
Sample link: https://stackblitz.com/edit/sbebms?file=index.js
Please let us know if any concerns.
Regards,
Sivamathi.
HS
Harry Shotter
April 3, 2020 11:06 AM UTC
Hi Sivamathi,
Thanks for you reply.
I will give it a try.
Harry.
SN
Sivamathi Natarajan
Syncfusion Team
April 6, 2020 05:56 AM UTC
Hi Harry,
Thanks for the reply. And, we will wait until we hear from you.
Regards,
Sivamathi.
HS
Harry Shotter
April 6, 2020 09:16 AM UTC
Hi Sivamathi,
I've tried this and it looks like it gives me the results I was looking for.
Thanks for your help,
Harry.
SN
Sivamathi Natarajan
Syncfusion Team
April 6, 2020 10:02 AM UTC
Hi Harry,
Thanks for the response. As always, we will happy to assist you.
Regards,
Sivamathi.
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
-
HS Harry Shotter
- Mar 25, 2020 02:17 PM UTC
- Apr 6, 2020 10:02 AM UTC