Apply button improvement when have some measure in wrong position

Answered
Jose Eduardo Almeida asked on January 29, 2024

When I have some measure on line instead of in the measure square the apply button should not be available. This button just shoud be available when all the measures are in wright position.
If just one measure isn't in the wright position the apply button is available and when clicked an error happens in the next page.

Attachments:
Screen_01.JPG

5 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster January 31, 2024

Hello, Jose!
 
Thank you for your question.
 
We recommend the following approach to disable the Apply button in the Field List if the measure is set to the wrong box:
1. Add the mouseup event listener to the Flexmonster component container, e.g.:

document.querySelector('#pivot-container').addEventListener("mouseup", (e) =>{});

2. Inside the event handler, query all measures from the Field List pop-up and all the contents of the boxes.
3. Check for any measure in the Rows/Columns/ReportFilters box. If so, toggle the fm-disabled class on the Apply button.
 
We have prepared a JSFiddle example to illustrate the approach: https://jsfiddle.net/flexmonster/n7qg2rdu/.
 
Hope you will find our answer helpful.
 
Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster February 7, 2024

Hello, Jose!

Hope you are doing well.

Our team is wondering if you had some time to check out the provided example with disabling the Apply button on the field List while measures are in the wrong boxes. Could you please let us know if it was helpful?

Looking forward to hearing your feedback.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster February 20, 2024

Hello, Jose!

Hope you are having a great week.

Just checking in to ask if the example of disabling the Apply button on the field List while measures are in the wrong boxes was useful.

Looking forward to hearing from you.

Best regards,
Solomiia

Public
Jose Eduardo Almeida February 21, 2024

Hi Solomiia,
 
yes it works fine and was very useful.
 
Thank you so much!

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster February 21, 2024

Hello, Jose!

Thank you for your feedback.

We are glad to hear our example was useful.

Feel free to contact us in case any other questions arise.

Best regards,
Solomiia

Please login or Register to Submit Answer