Description in labels does not appear when a lower level of the hierarchy is selected.
See print screen 01, 02 and 03.
When only the highest level of the hierarchy is marked and after clicking Save Format and refreshing the screen, the descriptions of all selected hierarchies appear, as shown in the print screen 04 and 05.
We are also sending snippets of the APEX page code (Execute When Page Loads).
Hello, Jose!
Thank you for reaching out to us.
The provided screenshots show the default behavior when a lower hierarchy level is selected. In this case, Flexmonster shows the data for this level and the other levels below it. This provides multilevel hierarchies with more flexibility since the smaller sub-hierarchies can be selected. Please tell us which functionality you expect to achieve while selecting a lower hierarchy level, it would greatly help us.
Looking forward to hearing from you.
Best Regards,
Maksym
But it is the same data that is showed in the higher level but in higher level instead showing the number appears the description (location descriptions, item description...) and we would like to see this in the lower level too. Is it posible?
Hello, Jose!
Thank you for sharing more details.
If we understand you correctly, you expect to see the "DIA" caption when selecting this subhierarchy of a "Calendario"?
Looking forward to hearing your reply.
Best Regards,
Maksym
Helo Maksym,
when "Dia" caption is selected in Print_02.jpg we would like to see the description of this level as showed in Print_05.jpg. But when we select this lower level what we see is Print_03.jpg.
The description that is in Print_05.jpg just appear when just higher level (Calendar) is selected (Print_04.jpg)
Regards
Hello, Jose!
Thank you for your reply.
Though this functionality cannot be accessed with default UI controls, you can show the members of higher hierarchy levels with the `customizeCell` method. By using the CellDataObject
's member property, you can retrieve the parent member containing all descriptions from upper hierarchies. Later, they can be formatted and added to the cell's text. You are welcome to check the code example: https://jsfiddle.net/flexmonster/9etwszv7/
Please let us know if this solution works for you.
Best Regards,
Maksym
Hi! Thank you for your response.
Reviewing the application it was identified that in some cases the Members Request is not called, causing the problem of displaying Unique Name instead of Label.
https://www.flexmonster.com/api/members-request/
We need to guarantee that selecting any hierarchy level the Members request is called.
Please, let me know if you need any further detail.
Hello, Jose!
Thank you for reporting this issue.
Please note that the current logic of the custom API data source implies always sending the "/members"
request. Since the request is not called at all, we believe that this may be a client-side issue with Flexmonster. Could you please provide a code snippet with Flexmonster where the issue can be reproduced?
Looking forward to hearing from you.
Best Regards,
Maksym
Hello Maksym,
pivot = new Flexmonster({
container: "pivotContainer",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
//height: 530,
height: "100%",
customizeAPIRequest: customizeAPIRequestFunction,
//cellclick: onCellClick,
customizeCell: customizeCellFunction,
beforetoolbarcreated: customizeToolbar,
global: {
localization: "https://cdn.flexmonster.com/loc/pt.json"
},
report: {
dataSource: {
type: "api",
url: pivotEndpoint,
index: "",
concurrentRequests: true
},
localization: {
"fieldsList": {
"values": "Medidas"
}
},
slice: slice,
formats : [
{
name: "",
thousandsSeparator: ".",
decimalSeparator: ",",
decimalPlaces: 2,
maxDecimalPlaces: 2,
maxSymbols: 20,
negativeNumberFormat: "-1",
currencySymbol: "",
negativeCurrencyFormat: "-$1",
positiveCurrencyFormat: "$1",
isPercent: false,
nullValue: "",
infinityValue: "Infinity",
divideByZeroValue: "Infinity",
textAlign: "right",
beautifyFloatingPoint: true
}
]
, options: {
grid: {
//title: "FPAP-FidenTech Planning Application Platform",
showHeaders: false,
//grandTotalsPosition: "top",
//type: "classic",
showGrandTotals: "off",
showHierarchies: false,
showHierarchyCaptions: true,
//tem que desligar o filtro, pois se o usuários filtrar multiplas posições, o motar de cálculo tem que conseguir calcular múltolas posições de uma só vez
//showFilter: false
},
showAggregationLabels: false,
caseSensitiveMembers: true,
drillThrough: false,
showDrillThroughConfigurator: false,
showEmptyValues: true
//allowBrowsersCache: true
}
}
});
flexmonster.on('olapstructureerror', function (e) {
alert('Error with olap structure!' + e.error);
});
})()
We implement our own Custom Data Source API (Implement your own server) and we use multi level Hierarchies and pivotEndpoint Function
Hello, Jose!
Thank you for sharing these details with us.
We were unable to reproduce the issue with /members
requests not being sent with our custom API index: https://jsfiddle.net/flexmonster/vbLnzofc/
Perhaps the /members
request is handled incorrectly on the server, which makes it seem that the request is not called by Flexmonster. We suggest checking the Network tab in the browser console to ensure whether /members
requests are sent.
Looking forward to hearing your feedback.
Best Regards,
Maksym
Hello, Jose!
Hope you are doing well.
Our team is wondering if you had a chance to check if the /members
request is being sent. It would greatly help us to continue our investigation.
Looking forward to hearing from you.
Best Regards,
Maksym
Hi Maksym,
/members request is not being sent.
1- See print labels.png
2- 022_m01 is the code and not the label
5001 is the code and not the label
3- Demonstration of network requests where the /members request does not appear
See print screen:
handshake.png
fields.png
select_01.png
select_02.png
select_03.png
4- None of the requests above were members
Could it be related to “customizeAPIRequest: customizeAPIRequestFunction,” ?
Could it be related to the use of the function in the URL? “url: pivotEndpoint,”
function pivotEndpoint(request, successCallback, errorCallback) {
console.info("pivotEndpoint request :",request);
apex.server.process( "PIVOT_ENDPOINT", {
p_clob_01: request
}, {
success: function( data ) {
successCallback(data.response);
},
error: function( jqXHR, textStatus, errorThrown ) {
console.error('Erro na chamado Ajax PIVOT_ENDPOINT',errorThrown);
errorCallback({
message: "status: " + textStatus + "\nmessage: " + errorThrown
});
}
} );
}
Hello, Jose!
Thank you for providing us with these details.
Based on the network logs you provided, we can confirm that the /members
request was not sent. Unfortunately, we have not been able to determine the exact cause of this issue yet. In order to continue our research, we kindly request that you provide us with access to the "PIVOT_ENDPOINT" server and the "customizeAPIRequestFunction" code. This would greatly help us to continue the research regarding the issue.
For privacy purposes, please forward the "PIVOT_ENDPOINT" access credentials via indox.
We appreciate your cooperation and look forward to hearing from you soon.
Best Regards,
Maksym
Hi, Jose!
After further reflection and analysis, our team has prepared several recommendations that we hope would be useful for solving the case.
We recommend examining each request and response logged in the pivotEndpoint
function, as this will significantly help trace the cause of the issue. The requests are already logged by console.info("pivotEndpoint request:",request)
; the response logging should be added as well:
type: "member"
are logged, we suggest taking a closer look at the behavior of function apex.request.process
. type: "member"
are not logged, this could indicate the issues with previous requests. Custom API requests are composed based on the previous responses. This means that the response with a format different from the standard can cause unexpected behavior when Flexmonster handles them on a client.Based on our observations, Flexmonster can still retrieve the data about members since the grid screenshot provided in the labels.png contains a loaded pivot.
Looking forward to hearing from you.
Best Regards,
Maksym
Hello, Jose!
Hope you are doing well.
Our team would like to know if you were able to solve the issue with the /members
request not being sent. We are ready to provide you with further assistance if it is neccesary.
Looking forward to hearing your feedback.
Best Regards,
Maksym
Hi Maksym,
Sorry for the delay.
We were able to reproduce the error in the https://jsfiddle.net/flexmonster/vbLnzofc/ follow the steps bellow:
1 step: Remove SLICE from the code.
Remove
",
slice: {
rows: [{
uniqueName: "Item"
}],
columns: [{
uniqueName: "[Measures]"
}],
measures: [{
uniqueName: "Price",
aggregation: "sum"
}],
drills: {
rows: [{
tuple: [
"item.[accessories]"
]
}]
}
}"
2 Step: Click in run on JSfiddle and see that the window fields opens and the requisitions 'handshake' and 'fields' was done(evidence1.png)
3 Step: select ITEM and PRICE (evidence2.png)
4 Step: Click in Apply, see that the requisition /members was done
5 Step: Restart the example Click in run on JSfiddle and see that the window fields opens and the requisitions 'handshake' and 'fields' was done exactly the same as step 2(evidence3.png)
6 step: Select Category and Price (evidence4.png)
7 Step: Click in Apply, see that the requisition /members was not done and the problem occurs (evidence5.png)
Looking forward to hearing your feedback.
Best Regards,
Eduardo
Hello, Eduardo!
Thank you for sharing these details with us.
We were able to reproduce this behavior and the "/members"
request is indeed not sent. However, note that this behavior is expected when a particular hierarchy level is selected instead of a whole hierarchy. Due to their specifics, this behavior is specific to multilevel hierarchies; however, the members are still parsed from the response to the "/select"
request, allowing valid data to be displayed.
Returning to your initial inquiry to show the parent levels of a lower level on the grid, the sample provided in our older response would not work for the custom API. This is caused by differences in multilevel hierarchy processing in custom API and JSON data sources, which causes the different representation of members in the CellDataObject. We have adjusted the customizeCell
function from the previous sample to make it work for custom API data sources: https://jsfiddle.net/flexmonster/vwmszpqb/
Please let us know if this helped to address your original request.
Best Regards,
Maksym
Hi Maksym.
Thanks for the quick reply.
After try with the solution that you recommended on the last comment, we saw that the caption (description/label) does not appeared on the select result as you can see on the attached file
Member_No_label.png. The uniqueName continues showing on the grid
Best Regards,
Eduardo
Hello, Eduardo!
Thank you for your reply.
From the given cell data shown on the screenshot, it seems that you are using the member object's id
property to identify members: https://www.flexmonster.com/api/member-info-object/#id
This parameter allows mapping member value
to a corresponding id
. Flexmonster would later use these id
s in /select
requests to identify the member. In most cases, Flexmonster will map each id
to a corresponding value. However, for the particular case of selecting a hierarchy level, the /members
request is not sent. As a result, the component only receives id
of each member, causing issues with displaying member labels.
If this is the case for you, we recommend removing the id
parameter from the /members
response and using the values instead of ids for the /select
response. Please note that the id
parameter is optional, and all Flexmonster features would be available without it.
Please let us know if this solution would work for you.
Best Regards,
Maksym
Hi Maksym,
This not work for me because the id is the key if I don't put the id I will have to use tha label as key, but i can't do that, in the label i can have spaces and special char and I have labels that can be equal in differents id.
Best Regards,
Eduardo
Hi Maksym,
I think the exemple.png attached will help understand the problem.
Thanks
Eduardo
Hello, Eduardo!
Thank you for your reply.
We understand your argument for using the id
property for members. Our team will research the possible solutions for overcoming this behavior of "/members"
requests not being sent in this specific case. We will get back to you with the results of our research, ETA May 13th.
We will notify you about updates on this matter.
Best Regards,
Maksym
Hello, Maksym!
Any update about a possible solution?
Thanks,
Thiago!
Hello, Thiago!
Thank you for checking on updates.
Our developers were able to find a solution for the issue with the /members
request. The fix will be available in the next minor release on May 13th.
Best Regards,
Maksym
Hello, Jose!
We are happy to inform you that the new preloadMemberCaptions
mapping property was introduced. With this property, the /members
request will be sent when a certain level name is selected. Please check the JSFiddle example: https://jsfiddle.net/flexmonster/fzym20xe/
This is available in the 2.9.77 version of Flexmonster. You are welcome to update the component. Here is our updating guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/
Please let us know if this solution works for you.
Best Regards,
Maksym
Hi Maksym,
Thank you, we have been waiting for this update! We tried the same steps that Eduardo Cruz showed above, but in the JSFiddle that you mentioned in your last comment, but we continued to have the same issue.
The requisition /members was not done.
Hello, Thiago!
Thank you for your reply.
From the provided description and evidence, there might have been some inaccuracy within your configuration. Please make sure that the preloadMemberCaptions
property is set inside the mapping to all fields within the multilevel hierarchies, as shown in the example below:
"mapping": {
"Country": {
"hierarchy": "Data",
"preloadMemberCaptions": true
},
"Color": {
"hierarchy": "Data",
"parent": "Country",
"preloadMemberCaptions": true
}
}
In our JSFiddle example, you can compare the behavior with or without the new preloadMemberCaptions
property if you remove it or set it as false
. The example contains a function endpoint with the id
property for members used, and the request results are prompted into the console. After disabling the preloadMemberCaptions
, the /members
request is not sent, and the grid data shows IDs instead of proper captions while enabling this property, which results in the fix of this behavior.
Please let us know if you were able to utilize the preloadMemberCaptions
to resolve the issue with the /members
request.
Best Regards,
Maksym
Hello, Maksym!
We tried your solution again in your JSField and the /members request is indeed happening.
But in your example you are putting "preloadMemberCaptions" inside "Mapping". In our project we are not using mapping, because we are bringing our data from a custom multilevel hierarchy API. We tried putting "preloadMemberCaptions" inside our database returning a true value, but it is not working.
What could be the solution of using "preloadMemberCaptions" but in a custom multilevel hierarchy API?
Thank you!
Hello, Thiago!
Thank you for your reply.
To enable multilevel hierarchies in Flexmonster, the mapping must be set. Multilevel hierarchies are constructed on the client side and do not rely on specific responses from the server. Consequently, the mapping should be defined, and using the preloadMemberCaptions
property is possible. Additionally, we want to mention this parameter does not require any modifications on a server, as it simply forces the component to send an additional /members
request from the client side. This additional request has the same structure as default /members
requests.
Hope you will find this information helpful
Best Regards,
Maksym
Hello, Maksym!
In our custom API datasource we are using the "fields" request (https://www.flexmonster.com/api/field-info-object/), so we can't set the mapping like in your example.
The field response is already doing our mapping (https://www.flexmonster.com/api/field-mapping-object/).
We need a PreloadMemberCaptions to support our custom datasource API.
As you can see in your documentation the custom API suports the multilevel hierarchies.
https://www.flexmonster.com/doc/supporting-multilevel-hierarchies/
Thank you,
Thiago
Hello, Thiago!
Thank you for your reply.
Please note that the preloadMemberCaptions
functions exclusively within the mapping. Given the unique circumstances of the scenario that requires using this property, we believe that the mapping object is the most fitting place for including this property, and we are not planning to change this behavior. For guidance on setting up mapping, please refer to the following link: https://www.flexmonster.com/doc/mapping/
Hope this helps.
Best Regards,
Maksym