Rpa dev

how di I get the PNR, INVOICE DATE, HSTIN/ UIN OF Customer, place of supply

Original Invoice No:00000/0000000000 Invoice No: 000000/0000000000
Original Invoice Date:26­Nov­2018
11:38 AM Invoice Date: 03­Dec­2018
10:43 AM
Bill to
Passenger: MR. ARINDAM MUKHERJEE
PNR: z8zz3Z Sector: Gangtok ­ Kolkata
GSTIN / UIN of Customer: 06AAACM0829Q1Z8 Place of Supply: Haryana

Try this for everything @shilpa1

text.Substring(text.IndexOf("Invoice Date: ")+"Invoice Date: ".Length).Split(Environment.NewLine.ToCharArray)(0)

or

text.Substring(text.IndexOf("Invoice Date: ")+"Invoice Date: “.Length).Split(” "c)(0)

Credits to @lakshman

2 Likes

Is it pdf or any other?

if it is scan pdf go for abby flexi.

pdf data

@shilpa1, as @HareeshMR mentioned, you can use string manipulation or you can also go with Regex (if you are good at it).

I would suggest you to iterate through this input string line by line and then use string manipulation / regex. Also don’t forget to handle issues by putting IF condition.

Cheers!!

-Use Read PDF Text Activity
-Convert the string type of output in array (use new line delimiter)
-Loop through the array using for each loop
-use conditions to check whether the desired text exists or not

  • if exists then use string manipulation or regex

FYI… @shilpa1

for place of supply and GSTIN / UIA of Customer I’m not getting proper result

Use this for that @shilpa1,
text.Substring(text.IndexOf("GSTIN / UIN of Customer: ")+"GSTIN / UIN of Customer: “.Length).Split(” "c)(0)

yeah, it’s working I need to get place of supply also

pos.Substring(pos.IndexOf("Place Of Supply: ")+"Place Of Supply: ".Length).Spl(Environment.NewLine.ToCharArray)(10)

for this I’m getting
GSTIN / UIN of Customer: 06AAACM0829Q1Z8 Place of Supply: Haryana
I need to get the only place of supply

Give as (1) in the last of this in the place of 10 and try @shilpa1

getting balnk

Sorry, give zero :slight_smile:
@shilpa1

for 0 getting this

That was a simple mistake @shilpa1,

You are giving capital O, i mean upper case O in the activity to split and in the text you have small O i.e., lower case O. Try copy and pasting the text in the full text :slight_smile:

yeah got thanks

Happy to help @shilpa1 :slight_smile:

acutually I need explanations for the string operations u suggested me…please…

Substring is the one which can give us the value from the index and upto the length which we give in the function and split is a function which can split or divide the text upto which we give in the function. If we want to split upto a space (" "c) is the input or if we want to split upto the next line, we use Environment.NewLine.Tochararray @shilpa1

Hope this is clear :slight_smile:

1 Like

(" "c) I dint get this one