1466
Views
7
Comments
Solved
Read data from *.txt file
Question

Hi, I have one *.txt file (event log file) which generating from one of our machine. I want to read this text file & pick required event data from this file & store it on SQL for future reference. How to read the text file from Outsystems. So, help me on this matter.

UserImage.jpg
Skumar
Solution

Marcelo Ferreira wrote:

Hi Skumar,

Check if this can help you https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=4709

Regards,

Marcelo

Hi Marcelo,

Thanks for sharing sample OML to read text file.

But I am not getting data from the text file. The table record showing 'No items to show...' . While debug found BinaryData showing 0 bytes. See below image.

Also attached Text.txt file which try to read in Outsystems. 



Text.txt
2019-05-22 11-30-09
Marcelo Ferreira

Hi Skumar,

You can use this function BinaryDataToText and than stringsplit by NewLine() first to get each row of the file and than split again for the character that divide your columns.

Regards,

Marcelo



UserImage.jpg
Skumar

Marcelo Ferreira wrote:

Hi Skumar,

You can use this function BinaryDataToText and than stringsplit by NewLine() first to get each row of the file and than split again for the character that divide your columns.

Regards,

Marcelo



Thanks Mr. Marcelo for quick replay.

Do have any sample OML with you. Pl, share here.

2019-05-22 11-30-09
Marcelo Ferreira

Hi Skumar,

Check if this can help you https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=4709

Regards,

Marcelo

UserImage.jpg
Skumar
Solution

Marcelo Ferreira wrote:

Hi Skumar,

Check if this can help you https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=4709

Regards,

Marcelo

Hi Marcelo,

Thanks for sharing sample OML to read text file.

But I am not getting data from the text file. The table record showing 'No items to show...' . While debug found BinaryData showing 0 bytes. See below image.

Also attached Text.txt file which try to read in Outsystems. 



Text.txt
UserImage.jpg
Skumar

Skumar wrote:

Marcelo Ferreira wrote:

Hi Skumar,

Check if this can help you https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=4709

Regards,

Marcelo

Hi Marcelo,

Thanks for sharing sample OML to read text file.

But I am not getting data from the text file. The table record showing 'No items to show...' . While debug found BinaryData showing 0 bytes. See below image.

Also attached Text.txt file which try to read in Outsystems. 



Now it is working, actually I set OK button method property to Ajax Submit, now I change to Submit. After this it is working fine.



2019-05-22 11-30-09
Marcelo Ferreira

Hi,

Glad I could help. Yes to get files from upload you need to use a submit button. The Ajax Refresh on OK is the one that should be deleted

Regards,

Marcelo

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.