How to Perform Calculations on Data Imported via Excel Importer in Mendix?
0
I’m working on a project which I have to import data from an Excel spreadsheet using the "Excel Importer" module. After importing, I need to perform calculations on this data before committing it to the database. My specific questions are: 1. What’s the best approach to access and manipulate imported data before committing? 2. Is there a way to add calculation logic during the import process itself? 3. Should I create separate microflows to process the data post-import? Details of my use case: - I’m importing into a non-persistent/temporary entity. - I need to compute derived fields (e.g., totals, averages, percentages). - Some calculations depend on values across multiple rows. What I’ve tried so far: - Adding validation rules in the entity. - Creating a post-import microflow but struggled to access all imported records at once. Has anyone implemented something similar? Any advice or examples would be greatly appreciated!
asked
Bernardo Seabra
1 answers
0
You will need to import the records via a microflow action and make sure the imported records are associated to 1 record to be able to access all records. See https://docs.mendix.com/appstore/modules/excel-importer/#reference-to-import-objects Then in a second step after the import action perform the calculations and as the last step in the MF copy the data to persistent entities and commit the data there.