How to restrict Excel file to import if uploaded records already exists in the database table.

0
Hi Guys, I want to restrict excel file to import if the uploaded excel row data already exists in the database table I do not want to override/update existing data if key attribute is already exist in the table. 
asked
3 answers
2

Hi,

You can temporarily import excel data in non-persistent entity and in a microflow fetch data from both i.e., from non-persistent and the actual database(where data will be saved finally) using retrieve activity.

Then do the comparison and then decide whether to save data in actual entity or end the flow.

Hope this helps!

answered
2

Hi Shubham Dhorajkar,

 

using below steps you can achieve your solution.

 

  1. create non-persistable entity ( same as your main entity )and configure that entity into excel configuration page.

  1. call one microflow on event handler and check the employee from database and from excel row(Empimport entity) and retrieve that employee. Depending on the object empty or not status create your employee entity.

 

 

Hope it helps!!!

answered
0

Hi Subham,
Do you want  the whole Excel file to not import if any one of the record is found in the database or you want to exclude the row that is present and then create others ?

If you want the second option you can make use of the Excel import settings “Only Create new objects ” option.

 

You can also explore other options in the link. You can make use of the settings given by the module instead of Creating flows.
For your Reference : https://docs.mendix.com/appstore/modules/excel-importer/#references

 

If you want the whole excel file to not import you can make use of other solution given above.. 

answered