Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Some weird issue coming in date column

amir asked on November 9, 2020

I have a simple flexmonster chart. You can access that by opening the file attached into the flexmonster. Than it shows a report by default.
Then go to options and convert it to flat table. After this enable all columns to show all columns in the flat table.
Now the problem is that the data shown is inconsistent. Some date columns have data and some not. Also when i try to export into excel it hangs the chart.
Please guide me what i am doing wrong here
Just in case if this helps my data is actually like 
                [“createdAt”: “2020-02-04T15:48:40.190Z”,
                “accessData: {
                      “accessedAt”: “2020-02-04T15:48:22.263Z”,
                      “accessData.modifiedAt”: “2020-05-04T20:32:05.669Z”,
                “name”: “Sam”]
and i am converting (making flat) this into 
                “createdAt”: “2020-02-04T15:48:40.190Z”,
                “accessData.accessedAt”: “2020-02-04T15:48:22.263Z”,
                “accessData.modifiedAt”: “2020-05-04T20:32:05.669Z”,
                “name”: “Sam”
My second question is that through out my application we use date format as ‘mm/dd/yyyy’. Even on flexmonster grid(using datePattern in options object). But when i export grid into excel the excel file exported has date format as ‘dd/mm/yyyy’. Is there any way i can change date format in exported excel to ‘mm/dd/yyyy’

report (28).json

4 answers

Milena Pechura Milena Pechura Flexmonster November 12, 2020

Hi, Amir,
Apologies for the late response.
Thank you for your questions and for providing the report. Please find our explanations regarding each point below.
1. As the "date" type separates the date value to date.year, date.month, and (where the date is a kind of dimension), we have not implemented the dimension feature for several "date" type fields in Flexmonster.
This is the reason why the grouping of accessData.modifiedAt and accessData.accessedAt led to an unexpected result – some values are not shown.
To fix the issue, our team recommends not to group several fields with the "date" type. If it is needed to group the mentioned fields under one dimension, we suggest specifying the "date string" type for the fields. Please note that you could also group a "date" type field with fields of other types.
2. We would like to kindly inform you that the described component behavior is expected: for the Excel export, Flexmonster sets the “default” format for the data. This means that the date format in the exported file opened in Excel will depend on the format configured in your OS settings.
Please let us know if it helps and if any other questions arise.
Best regards,

amir November 18, 2020

Thank you for the response i have one another query for date type fields.
I have a flexmonster chart and in this i have set date type to ‘date’ in order to enable user to use year, months and days in chart. Now in chart this is ok but when the end user converts chart to grid (say flat grid) the date columns is shown in 3 seperate columns (year, month an day).
Is their any way the user when changing the chart to grid view can change the date column type to date string from the toolbar configuration or anywhere else from the front end. If so how?

Milena Pechura Milena Pechura Flexmonster November 20, 2020

Hello, Amir,
Thank you for your question.
As the most efficient solution for your case, we suggest the approach shown in the following example:
The main idea is creating a duplicate for the date field in the data passed to Flexmonster. These two fields with the same data should have different types – "date" and "date string". While switching between charts and flat view, a new slice with a preferable field will be set in the runQuery API call.
Here is the list of methods and events our team used in the example:

Please let us know if the suggested approach works for you.
Kind regards,

Milena Pechura Milena Pechura Flexmonster 2 days ago

Hi, Amir,
Hope you are doing well.
We are wondering whether the suggested approach works for you.
Our team will be glad to hear your feedback.
Best regards,

Please login or Register to Submit Answer