Find Item in If condition not working


Hi, every time it shows Not Found, can’t understand what’s the problem here.

Hi @ADITYA_MUKHERJEE,

Kindly check the condition,

after converting the string to lower text , the condition supports to be row(0).ToString.ToLower.Contains(“delivery &”)

Thanks and Regards,
P.Ajithkumar

1 Like

Hai @ADITYA_MUKHERJEE… Use .UCase instead of lower case …the mistake made by the given condition I think so…

1 Like

Don’t know why it’s not working for this condition but it is working for other conditions for other cells.

@ADITYA_MUKHERJEE …Have a try with @Ajithkumar_P 's Idea that’s removing the quote?

2 Likes

Sorry, didn’t get what you said.

No bro, if you’re converting a string to lower case , it will become all the characters are lower case only. i can see your condition having the first character is Capital D.

Thanks and Regards,
P.Ajithkumar

1 Like

Yeah @ADITYA_MUKHERJEE… This what I’m trying to convey… Use UCase not LCase

1 Like

The problem can be an addition space as well.
First thing, Can you please log the text from the row before checking existence and add that text here?
row(0).ToString.ToLower
Or if you can share the excel, that will be perfect. If you have any concerns about this, delete all other data in excel and keep only the first column data for few columns.

1 Like

Did you try like row(0).ToString.StratsWith(“yourKeyWord”)
@ADITYA_MUKHERJEE

Seems like you have provided wrong input file. Can you send the correct one that matches the conditions you have specified in your workflow.

1 Like

PO_Table_Output.xlsx (10.1 KB)
PO_Table_Output.xlsx (9.8 KB) Main.xaml (40.8 KB) op.xlsx (8.8 KB) Main.xaml (40.8 KB) POP2.pdf (66.7 KB)

So here is the entire thing that I am trying to do:
Bot extracts from the pdf(POP2) and writes the required details in a structured format.
The expected output is in the excel file named(PO_TABLE_OUTPUT((1st one, 10.1kb))
But I am getting the output as in PO_TABLE_OUTPUT((2ND one, 9.8kb))
The difference is seen in the second sheet, Customer Name and Customer Address cell is coming blank.
The excel file (op.xlsx) is the format in which the pdf is getting extracted after data scraping. (not included in the workflow here, but from this format, after data manipulation, I am trying to achieve the desired output.)

use your condition like this:
IF (String.Compare(row(0).ToString, "Delivery ", True) >= 0)

1 Like

row(0).ToString.ToLower.trim.Contains(“delivery &”)
or
row(0).ToString.ToUpper.trim.Contains(“DELIVERY &”)

1 Like

Not working…

Not working

It worked for 1st iteration but during secind iteration throws erroe.
“Assign: Index was outside the bounds of the array.”

@ADITYA_MUKHERJEE Can you Show us the value of row(0).ToString.ToLower.Trim in a Message Box?

I have provided the work flow and the excel files…mesage box will be of no use as it is not entering the loop.

PO_Table_Output.xlsx (10.1 KB)
PO_Table_Output.xlsx (9.8 KB) Main.xaml (40.8 KB) op.xlsx (8.8 KB) Main.xaml (40.8 KB) POP2.pdf (66.7 KB)

So here is the entire thing that I am trying to do:
Bot extracts from the pdf(POP2) and writes the required details in a structured format.
The expected output is in the excel file named(PO_TABLE_OUTPUT((1st one, 10.1kb))
But I am getting the output as in PO_TABLE_OUTPUT((2ND one, 9.8kb))
The difference is seen in the second sheet, Customer Name and Customer Address cell is coming blank.
The excel file (op.xlsx) is the format in which the pdf is getting extracted after data scraping. (not included in the workflow here, but from this format, after data manipulation, I am trying to achieve the desired output.)