101
Views
4
Comments
Solved
Excel sheet upload help needed

Hello 

I am facing an issue where I have to upload the same excel sheet multiple times with some or the other changes being done. But the problem that I am facing is that whenever I upload the Excel sheet after the changes is done. My table on the screen where I display all the records shows not only shows the previous records but also the one with changes. FOR EG

I have a table with 4 columns and 3 records so when I uploaded the excel sheet for first time it showed only these records. But for the second time when I again upload the same excel file with just changing any minor things (like spelling) it again uploads all the 4 columns and 3 records. So I am having a lot of duplicate data created. Can you please help me to update these records in such a way that whenever I re-upload the same excel file only the updated column changes and the other ones remains as it is without creating multiple records.


2022-07-03 17-24-08
Sourabh sharma
Solution

Hi Athulya Panicker 

For that you need first to clear the previous  data and then upload the updated file again in the same given format.

for that kindly follow the oml file

hope that will help you..

Kind regards

bts11.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi Athulya,

It's hard to tell you exactly without seeing your logic, but I'm assuming that your entity has sn autonumber id, and so at some point you are probably turning your excel into a record list, and then loop through it with a ForEach, doing a CreateOrUpdare.

Inside that loop, you must first do an aggregate to fetch the record, based on whatever piece(s) of data you have in your excel that uniquely identify each record.

Then do an Assign, assigning all values of the aggregate result from the excel record, but not the id.  Then do your CreateOrUpdate.

Dorine 

2020-11-13 07-48-15
Khuong Truong

Hi Athulya,

The issue is that whenever you upload it will create new record.

In this case, I think you need to have a check before save a record. 

You need to define where is the unique key (for example column 1 and column 2 is a unique key). Then you can check if record already exist by for example using Aggregate and filter by column1 and column2 if return not empty => existed.

Based on exist or not then you can create or update the record.

Hope you get the idea.

Regards,

Khuong


2023-10-21 19-42-11
Tousif Khan
Champion

Hello,

Are you trying to Upload and Bootstrap your data into entity which is saved in your excel file, or you are uploading and saving excel file as well in your data base. Or you just want to Upload the file and bootstrap the Excel data into your Entity database.

Please let me know what it is so, it would be clear and if you could attach Oml or some snapshots what you are trying and what you want to achive it will really help

Thanks

2022-07-03 17-24-08
Sourabh sharma
Solution

Hi Athulya Panicker 

For that you need first to clear the previous  data and then upload the updated file again in the same given format.

for that kindly follow the oml file

hope that will help you..

Kind regards

bts11.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.