21
Views
4
Comments
Solved
Import Excel data into entity by button click
Application Type
Reactive

Hello Everyone ,

                            I'm trying to import records from excel to my entity by button click by the user but unable to do it .

I have attached the oml file . Can you please help me in solving this problem .

 

Thanking You ,

Regards ,

Rahul Gupta

UploadBulkExcelwrg.oap

Rank: #472
Solution

Hi Rahul,

You use file from Resources instead of your uploaded file:

I changed your oml so it have to work now. But I didn't test it so write if something go wrong.

UploadBulkExcel.oml

Rank: #101

Hi,

More details to add to what Daryna wrote:

Your "If" have the braches switched.

You don't need to pass to JSON. You can simplify.


You have some bad practices in your logic.


Please, see my attached OML and try if it's that that you need. Maybe you need to refine something, but the "normal behavior" was tested.


NOTE: It's supposed if your entity already have data no NOT upload the data from excel (That can be managed in the "IF" inside the BoostrapEmployees action). If you wan to to change that behavior, take in consideration the case that you can obtain duplicated values (if the some of the values that you are bootstraping are already in the database). Verify if you have already employees, because if you have, it will not load any data.


Best regards,

Ricardo M Pereira

UploadBulkExcel.oap