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

Fetch dimensions affected by "show empty values"

Resolved
Accobat Development asked on August 31, 2023

Hello,
We currently have an issue regarding showEmptyValues. One of the features of our software is adding a value to every cell within a column. E.g. type "100" in the header of column "January", and every cell for every row within "January" will have "100".
The issue we run into is that this input change is added to dimensions that are hidden because they only have empty values. When this happens, the rows are unhidden.
We can implement our own logic to ensure that the input change is not applied to the rows, but we can't find information on what rows are affected. At least, not without a lot of workaround with checking the data source we have.
Is it possible to get any dimension affected by showEmptyValues? If not, is it something we could implement? I.e. "flexmonster.getEmptyDimensions()"?
 
Best regards
Jonas

3 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster August 31, 2023

Hello, Jonas!
 
Thank you for reaching out to us.
 
Kindly note that it is not possible to extract the values affected by showEmptyValues property out of the box.
Could you please provide us with more details about your use case? The screenshots, sample data, or JSFiddle example would help us greatly in finding another workaround for your case.
 
Looking forward to hearing from you.
 
Kind regards,
Solomiia

Public
Accobat Development September 1, 2023

Hello again,
 
Thank you for your quick answer 🙂 
 
Unfortunately, I don't have a simple JSFiddle or specific use-case for this. Since customers can add their own data through a very wide range of configurations, we haven't been able to prepare a "catch-all" or "representative" case for you.
I can describe, in broader terms, the how our function works.
 

  1. User selects a header cell and inputs a value
  2. The function combs through the header cell's recordId array
  3. Report data is found for each cell within the recordId array and the input is treated

The issue is that despite empty rows or columns not being shown, their cells are still counted within the recordIds. Thus, their value is changed by the input and they become unhidden. I have looked through the reportData values for each of the cells and can't necessarily find any variable or information that allows me to determine what cell is part of an empty dimension, and what cell may just have a null value (but be part of an otherwise visible dimension).
 
I can compare this situation to something like tableSizes where we may also have hidden certain dimensions. However, here we have a specific object that we can refer to, to see if the dimension is hidden and then skip changing input for any cell within.
 
 
I attempted a workaround by collecting a list of all visible dimension tuples via the customizeCells() function (as this seemingly only iterates over visible dimensions). However, this is just not good enough as it apparently only iterates over cells that are currently visible in the grid. Therefore, if you input data in a header that contains children out of the view (i.e. in a large grid), they will still be affected.

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster September 5, 2023

Hello, Jonas!
 
Thank you for the provided details about your use case.
 
Please note that the showEmptyValues property was created for data visualization, and tracking the change of the hidden data is beyond its limit.
Therefore, we kindly suggest tracking the described data changes at the data level instead of the visualization level.
 
Hope you will find our answer helpful.
Feel free to reach out to us in case of any other questions.
 
Kind regards,
Solomiia

Please login or Register to Submit Answer