I manage to successfully upload an excel file to create records by following the Outsystem How to Youtube video https://www.youtube.com/watch?v=0NVHxmiPGDs, but when I try to upload a new excel sheet with the same entity and entity attributes the records doesn't get updated and remains same.
It worked!!!
Introducing Aggregate GetEmployeesByEmpId as per your OML did the trick.
Thanks, Pramod.
Thanks, @Vinod Patidar and @Mayank Dharmpurikar for your valuable inputs.
Hello Syed,
Attached oml contains required logic.
Excel template should be like this-
Demo Url for same - Demo
Glad to help you :)
Regards,
Pramod.
Hi Syed,
Use createorupdate() instead of create().
regards,
Thanks Pramod, I tried using createorupdate() still the records are not getting updated.
Are you assigning ID's from excel or is it autoNumber?
When you upload the excel file in entity then OutSystems created a Server action named as "Bootstrap{EntityName}". Please see the below screens.
In this action If There is no records in entity then OutSystems Imported data from Excel to Entity. If data available in Entity then It does not Import data.
You need to customize this server action as per your requirement. You need to remove if condition and Instead of CreateEmployee entity action you need to use CreateOrUpdateEmployee entity action.
Thanks
Vinod
Hi Vinod,
Thanks for the reply.
In my case, I am uploading it from the upload widget , and I have already removed the GetPersons.list.Empty condition so that it directly starts with ConvertFromExcel since I am calling it from a File please see the attached screenshot. Maybe I am missing something...
HI Syed,
Please see the attached OML as per your requirements.
Please find the attached excel as well.
After calling the bootstrap server action action, in the onchange event of upload widget just clear the upload widget with the following JS code(Use JS widget to do this)
var parent = document.getElementById($parameters.ElementId);
var children = parent.children[0];
children.value = '';
ElementId you have to pass as Input parameter.