Hi,
I have CSV file so need to fetch data of only selected header and stored in DB
Hi @Vivek Pandile,
I don't understand. Could you please explain in more detail so I can help you? If you need an OML file, please let me know. If you're looking to import data into a table, please check the link below.
https://www.outsystems.com/forums/discussion/89043/how-to-upload-csv-files-to-a-database/
https://www.outsystems.com/forums/discussion/42701/import-csv-file-to-list-reocrd-under-outsystems-11/
Thanks,
Vipin Yadav
I have one CSV file where I have data of A,B,C and D column so I need data of B and D and rest of data ignore and that data would be inserted in entity.
Hi @Vivek Pandile
Create a structure with two attribute (i.e. B and D in your case) matched with your excel header, later assign this structure in Record Definition.
now all your excel data persist in structure so you can loop (add validation, if required) and insert data in entity.
I hope it'll help you.
ThanksDeep
I am using CSV file and how I can matched with CSV header and how I can insert only matching header data.
We have used on multiple occasions this great Forge component:
https://www.outsystems.com/forge/component-overview/1392/javascript-utils-o11
Regards,
Daniel
If you're okay handling this on the client side, you can use JavaScript to parse the CSV file, extract the required columns, and send the data to the server to insert into the entity using advanced SQL. I've attached a working sample OML for your reference. Please note that the JavaScript and SQL code were generated using AI, so if you plan to use it in production, ensure thorough testing and validation.
Agree with Daniel, this forge component is very useful: