Hi all,
I have successfully export data to a text file in outsystems, Now I want to Import text file data into outsytems and achieve copy paste functionality.
Goals- 1.Import data from text file 2. Add copy paste functionality
Note- For copy paste I want to add above ss section where user can paste there data and after click on submit button it will store data into data base.
also I have attached sample table name and its attributes names in excel format where I want to store data.(I don't want to import data form excel file which I already know goal is to import from text file and copy paste)
Many Thanks in advance,
Hello @subhajit ghosh
To read the data from the Text file which is (Binary data type), Now once we import the file, Importing I suppose you are importing from the local system. It can be uploaded from the upload widget, So now we have a file now we need to read the data which is in our text file o achieve this we will use a system extension called BinaryData which has a method BinaryDataToText. After you get the text, you can split it by lines, by using the Text extension's method String_Split.
You can add the dependency of these
Now once we have the data we can assign the data to a variable and then bind that variable to the text input on a screen.Now if we want to achieve copy paste thing, We can do it directly with a button click or on an action Where we will call the entity Create action, Here you need to create a database with an attribute(name), Now make sure that the data type text has enough length to store the data.Once the data is stored in a database. Would you like to export it via excel ?
If yes then you can directly use RecordList to excel widget available on server action, you can use that it will generate a binary file which you can pass on the client side on the client action on the download node.
Hope this helpsBest RegardsTousif Khan
Thanks for your idea will get back to you if I face any problem.@tousif khan
Hi @Tousif Khan
I am not able to assign values can you please check my oml and guide me now what to do,
Also check the copy paste page, I am using same server action for both pages.
PFA