mapping object changes

Answered
Milan Dragovic asked on June 28, 2021

Hi there,
When I have first released my Flexmonster reports (over a year ago), I had to bring in all the fields from my data source in the order they were in my csv. If something was misspelled, it would have been ignored and it could potentially confuse FM and I had some unexpected results.  Also, if I specify all the columns from csv up to certain column in my mapping, the rest of the columns wouldn't be accessible in the report.
I have upgraded FM (to the one prior to the latest one).  I have only noticed today that all of this has changed now.  I now have all the columns from the csv regardless if I specified them them in mapping or not.  I have a few questions now:
Is this something that was changed in FM in that version?
How do I know what will get affected in my reports if I update to the latest version of FM?
Is there a way of hiding columns that are in csv and I don't want to have visible in the report?
Is it still necessary to map the columns in order they are coming from csv or not?
Regards
Milan

2 answers

Public
Vera Didenko Vera Didenko Flexmonster June 29, 2021

Hello, Milan,
 
Thank you for writing to us.
 

  1. Is this something that was changed in FM in that version?

    The changes to the mapping behavior for CSV data sources were introduced since the 2.8.7 version of Flexmonster. It was a fix for CSV data sources since hiding the fields that were not defined in the mapping object was not the expected behavior.

  2. How do I know what will get affected in my reports if I update to the latest version of FM?

    Our team releases minor versions of Flexmonster every two weeks, providing bug fixes and improvements. When making changes to Flexmonster, our team is aimed at providing backward compatibility and tries to make the migration process to the latest version as simple as possible. You can view the release notes for each new version by the following link: https://www.flexmonster.com/release-notes/. In addition, with every new major release, a migration guide is issued as well for assistance.

    Also, a quick way to check a specific report is by loading it on the main demo on our website - it always uses the latest version of Flexmonster. 

  3. Is there a way of hiding columns that are in csv and I don't want to have visible in the report?

    Yes, to hide columns, specify visible: false in the mapping object.
    For example:

    mapping: {
    "Overall rank": {
    visible: false
    }
    }

    Here is a JSFiddle for illustration: https://jsfiddle.net/flexmonster/0cL2sj9t/.

  4. Is it still necessary to map the columns in order they are coming from csv or not?

    In the latest release, in most cases, keeping the same column order as in the CSV data is not necessary. The exception is multi-level hierarchies: when defining multi-level hierarchies, the hierarchy levels (from the parent to the lowest level) must be defined in the same order as the corresponding columns in the CSV data.

 
Please let us know if this helps.
 
Kind regards,
Vera

Public
Milan Dragovic June 29, 2021

Thanks Vera!

Please login or Register to Submit Answer