We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Calculated value display original name

Answered
Gerd Tautenhahn asked on December 18, 2023

Hello,
I do have a small concern related to calculated values feature. When I crate one it is represented in the report as follows:
 

{
        "uniqueName": "testnull",
        "formula": "sum(\"Value\")",
        "caption": "testnull",
        "format": "-ay8339vdiwl00"
},

Then when I decide to edit it and change the name, the component changes the caption (as expected):

{
        "uniqueName": "testnull",
        "formula": "sum(\"Value\")",
        "caption": "testnulledited",
        "format": "-ay8339vdiwl00"
},

The problem is, after that I can no longer see (inside the calculated value dialog) what original calculated field name it references to (see attached screenshot).

Therefore, is it possible to display the unique name (maybe in brackets or any different way) alongside the caption in the calculated values dialog view (when uniqeName != caption)? Is there something out there that I could edit either in the config or codebase to display both names at the same time? (so that I could keep the original reference name in mind).

Best regards,

3 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster December 19, 2023

Hello, Gerd!
 
Thank you for reaching out to us.
 
Our team kindly recommends the following workaround to add the uniqueName to captions in the Calculated Values pop-up:

  1. Add the MutationObserver to the '#fm-pivot-view' element to check whether the Calculated Values pop-up is added to the DOM.
  2. Add the second observer to the '#fm-pivot-view div.fm-calculated-view' element to check whether the Calculated Values pop-up is opened.
  3. If the pop-up is opened, customize the captions using DOM API. The list of the pivot's measures can be extracted using getMeasures() API call.

We have prepared a JSFiddle sample to visualize the idea: https://jsfiddle.net/flexmonster/3gjhfp6w/.
 
Hope you will find our answer helpful.
 
Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster January 9, 2024

Hello, Gerd!

Hope you are doing well.

Our team is wondering if you had some time to check out our example of adding a uniqueName to the Calculated Values pop-up. 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 January 16, 2024

Hello, Gerd!

Hope you are having a great week.

Just checking in to ask if our example of adding a uniqueName to the Calculated Values pop-up was helpful.

Looking forward to hearing from you.

Kind regards,
Solomiia

Please login or Register to Submit Answer