I currently am assigned for a task, where i need to provide the end user with the capability to upload an excel, which only has 3 attributes that need to be saved, like exactly matching the attributes in the Database.
I clearly have no clue on how to even start. Besides the upload widget.
Hello Henrique.
What you want is to bootstrap the data.
Here you have a step by step manual and video
https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Bootstrap_an_Entity_Using_an_Excel_File
Hi Nuno,
Thank you for your help, but this is not exactly what i am looking for.
I need to allow the end user (lets say a manager) to upload an excel file.
And then only add data to already existing entities.
It's almost the same.
If the columns match, the rows will be written to the table.
It would be great if you could explain step-by-step how to do this.
How do you "Do an Excel to Record List targeting the entity"?
How do you "Do a create for each row"?
Thanks
Paul - very new to outsystems
Hi Henrique,
I placed a sample OML file for your problem's reference. Please look into it.
As you said enduser will upload the file, Please try to maintain proper record definition (Entity or structure) so the values uploaded from the excel file will be bootstrapped into DB properly.
URL : https://saravanan-gamechanger.outsystemscloud.com/TEST/Upload?_ts=637564713905386441
for the example attached record defn contains name and age attribute.
Thanks,
Saravanan
Hello Henrique,
1. you should use a upload widget for getting the excel file.
2. Convert the excel into record list using exceltorecord widget available in OS.
3. Compare the attributes of the record list with the attributes of your expected output.
4. Once the attributes are correct, you can loop inside the record list and insert the records into respected entity.
Hope this helps!
Krunal
I have provided solution & steps to upload an excel, which only has 3 attributes that need to be saved in OS database, like exactly matching the attributes in the Database.
Follow the below steps and refer the attached oml file to achieve your requirement, also use the attached excel for testing.
For Traditional: [https://andrew-ajay.outsystemscloud.com/ExcelUpload/Upload.aspx]
For Reactive: [https://andrew-ajay.outsystemscloud.com/ExcelUploadReactive/Upload?_ts=637582875208450998]
Note: The uploading excel header title should have the same name as the attribute has, if the title is different an empty value will be stored.
Regards
Ajay A