Limit the number of records imported using excel importer

0
In our application we have a requirement to allow user to import the list of buildings from excel sheet. I know that excel importer could help me in achieving the requirement to import data from excel to Mendix application but have couple of questions on configuration. Can anyone let me know how to address them  How could I set the limit on number of records that are getting imported into our application from excel. Is there a way to show the custom validation messages if user try to import invalid data into application from Excel. Example: If user tries to import a sheet which have wrong date format in it then instead of excel importer default behavior of showing the generic error saying "Import failed" can it show a message saying "Import failed due to wrong date format".   Thanks in advance.    
asked
1 answers
0

Hi Pranay,

For validation, you can  add validations on your entity so when the import is being done the database will validate the data. This will limit you to only what the database can validate.

Another option would to import the data to a non-persistent table and then do the validation in a microflow, and once the data is validated create the records that you want and commit them to the  database. The second option gives you more flexibility for validating your data. Also to do this, I you would need to use the input object configuration, and then you can retrieve your data over the association of the input object.

 

Regarding limiting the amount of records being imported, I don't think the excel importer can do that out of the box.

 

Hope this helps!

answered