Find Words in a text, Using (Contains)

Hey friends!.

I am performing the search for specific words, within pdfs.

I want to know if it contains the words, with the following string
[ Outputpdf_str.Contains(Garcia_str) ] .

In this case the word I want to find is Garcia.

before this add ReadPdf activity, that way I got the text, now I want to check if it contains the word Garcia.

I tell you that, the chain shows me an error, could someone tell me how it is structured correctly. please.

Hi @Ana_Patricia_Garcia

Just pass the the condition in IF Activity with out using Assign activity

Outputpdf_str.Contains(Garcia_str)

Regards
Gokul

image

1 Like

I already made the changes, but it still shows me the error.

Hi @Ana_Patricia_Garcia

Use Assign activity

LHS → Garcia_str

RHS → “Garcia”

Regards
Gokul

1 Like

Hi,

please check Garcia variable type

Regards,
Dhanush

1 Like

Hi,

What is the error in assigning activity? Can you share a screenshot of the eror?

Hello! Apparently it no longer shows an error.
now i need the pdf that contains the word (sponsored).
be selected and sent by email.

Please .

Well, if your requirement is only for sponsered as mentioned above,
Read the pdf to text and check if it contains sponsored in “if” activity.
Then part of “if” activity,

drag send outlook mail message - open properties and go to attachments argument panel and pass the pdf file path used in “read pdf” activity

I already wrote the output of the read PDF activity.
in the email attachments.
but it does not send me the pdf. I only get the body of the email.

What can I do in this case?

Not the textoutput of a pdf file, add the file path of the pdf file. in the attachment properties panel.
or
pass the input variable of read pdf activity into attachments

1 Like

Hi @Ana_Patricia_Garcia

You must need to enter the file path of the PDF file like bleow image

Regards
Gokul

1 Like

already sent the file. are good news!
but it does not send the specific file.

in the IF activity specify Outputpdf.ToString.Contains(“IEEE”)
What should I add to it so that it can send me the PDF containing the initials (“IEEE”)?
Please I am learning.

Hi @Ana_Patricia_Garcia

Here IEEE is the file Name of the PDF ?

Regards
Gokul

Hi @Ana_Patricia_Garcia

Here is the XAML file for Reference

FourmTest.xaml (10.1 KB)

Regards
Gokul

I have a folder with multiple PDFs
you have to select a single pdf.
the pdf must contain the word (IEEE) to be selected and sent by email.

I must use ( Caap.ToString.Contains(“IEEE”) ) to find the word in the document.

Hi @Ana_Patricia_Garcia

For each file in Folder activity will get all the pdf files in the folder.

Update XAML file

FourmTest.xaml (11.7 KB)

Regards
Gokul

1 Like

Hi. Just as a best practice, I would suggest using .tostring.toupper for both sides of the compare so AbC123 would match abc123 as an example (it would match as ABC123 = ABC123).

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.