Need a special offer?Find out if your project fits.
+

Description in labels does not appear when a lower level of the hierarchy is selected

Re-Open
Jose Eduardo Almeida asked on November 29, 2023

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).

17 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster November 30, 2023

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

Public
Jose Eduardo Almeida December 1, 2023

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?

Public
Maksym Diachenko Maksym Diachenko Flexmonster December 4, 2023

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 

Public
Jose Eduardo Almeida December 4, 2023

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

Public
Maksym Diachenko Maksym Diachenko Flexmonster December 5, 2023

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

Public
Jose Eduardo Almeida January 2, 2024

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.

Public
Maksym Diachenko Maksym Diachenko Flexmonster January 3, 2024

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

Public
Jose Eduardo Almeida January 22, 2024

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

Public
Maksym Diachenko Maksym Diachenko Flexmonster January 23, 2024

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

Public
Maksym Diachenko Maksym Diachenko Flexmonster February 13, 2024

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

Public
Jose Eduardo Almeida February 23, 2024

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
});
}
} );
}

Public
Maksym Diachenko Maksym Diachenko Flexmonster February 26, 2024

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

Public
Maksym Diachenko Maksym Diachenko Flexmonster February 27, 2024

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:

  • If the requests with type: "member" are logged, we suggest taking a closer look at the behavior of function apex.request.process
  • If the requests with 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

Public
Maksym Diachenko Maksym Diachenko Flexmonster March 21, 2024

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

Public
Eduardo Cruz 3 days ago

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
 

Public
Maksym Diachenko Maksym Diachenko Flexmonster 2 days ago

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

Public
Eduardo Cruz 22 hours ago

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
 
 

Attachments:
Member_No_label.png

Please login or Register to Submit Answer