16
Views
5
Comments
Upload a document and search for keywords in documents
Application Type
Reactive

Hi All,

I got requirement where user can upload a file and after uploading we need to search for specific keywords in the uploaded file and if the keywords matches then only will be storing the data in database.

The keywords will be matching with the attributes in database.

The uploaded file will be of any type like .txt,.word,.xls,etc.

Is there any way for achieving this requirement in outsystems.

Regards,

Vin J.


Hello Vin,

For your use case you need to use OCR, few forge components will help you to extract the the data from uploaded file and you can perform search operation on them,

Please check the following forge components,

https://www.outsystems.com/forge/component-overview/1572/googlecloudvisionocr 

https://www.outsystems.com/forge/component-overview/3086/simple-ocr 

https://www.outsystems.com/forge/component-overview/14506/image-ocr-utility#:~:text=Optical%20character%20recognition%20or%20optical,text%20superimposed%20on%20an%20image

Hope this will help,

Komal


Hi Komal,

Thank you for your reply.

I have checked the components that you have shared but it is of no use.

Here I am uploading a document not any image.

Regards,

Vin J.

Hello Vin,

In my project we have used Nanonets OCR for uploading documents and retrieve the information from the uploaded document and process on the retrieved data further. 

Please see these links,

https://nanonets.com/blog/low-code-automation/ 

https://marketplace.uipath.com/listings/invoice-ocr-and-invoice-data-capture-nanonets 

Regards,

Komal

Hi Vin, 

I don't think there's any one sized fits all solution for all your file types, but you can probably build some logic to check the file extension and do the checking based on the file extension.

For txt files you can use the binarydata extension to convert the file to text, which you can use a function like Index to search for the keyword. 

For other file types like excel, you might need to use other extensions like Advanced Excel to transverse the entire document.

I'm sharing the sample OML for search within .txt for reference

TextSearch_v5.oml

As others have mentioned before, there's no on does all function for this.

There are plenty of forge items to help you with what you want to achieve.

In the OML I attached you will find a working reader for PDF and TXT files.

For TXT's I used the System>BinaryDataToText action.

For PDF's I used the PDF Helper forge component.


Good luck

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