langsem
(Langsem)
June 14, 2019, 10:30am
1
Hello i am trying to assign a variable to a speifcif line for later use.
this its what the uipath sees on the pdf
“Hurtigruta Carglass AS\r\n1(1)\r\n(Ensjøvn. 17)\r\nPOSTBOKS 6452 ETTERSTAD\r\n0605 OSLO\r\nForetaksregisteret NO 985758220 MVA\r\nKunde 100454 Avdeling Alnabru\r\nBank\r\n4202 33 70055\r\nTRYG FORSIKRING\r\nIBAN NO77 4202 3370 055\r\nPostboks 7070\r\nSWIFT SPTRNO22\r\n5020 BERGEN\r\nTlf 98709500\r\nFax 22 70 76 01\r\nregnskap@hurtigruta.no\r\nDeres referanse\r\nwww.hurtigruta.no\r\nFAKTURA 14780866\r\nFakturadato 08.06.2019 Skadedato 07.06.2019\r\nForfallsdato 08.07.2019 Reg.nr. EK71995 Vår referanse Avdeling Alnabru\r\nKID147808661\r\nLeveringsdato 07.06.2019 Kundens ordrenr\r\n0000456218\r\nVarenr Varetekst Antall Pris % Sum\r\nRep av frontrute\r\n50 REP-1 1,0 STK 650,00 650,00\r\nm.v.a. av kr 650,00 162,50\r\nTotalsum: 812,50\r\nAvrunding 0,50\r\nSum å betale: 813,00\r\nBankkontonummer: 4202 33 70055\r\nBiler med fradragsrett for merverdiavgift, skal svare denne avgiften i tillegg til en eventuell egenandel.\r\nFor disse bilene dekker forsikringsselskapet kun netto faktura.”
I want to extract TRYG FORSIKRING. Only thing its that this can change based on pdf files, so i cant search for TRYG FORSIKRING itself,
Thanks in advance
RobertD
(Docan Robert)
June 14, 2019, 10:44am
3
You can try getting the text between Bank and IBAN and the split it by \r\n and get the 3rd item
(?=Bank)(.*)(?<=IBAN)
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET.
RobertD
(Docan Robert)
June 14, 2019, 10:47am
6
langsem
(Langsem)
June 14, 2019, 10:51am
7
It prints out as a big bunch of one text file. So they are not grouped
RobertD
(Docan Robert)
June 14, 2019, 10:52am
8
Could you share a screenshot of your workflow?
langsem
(Langsem)
June 14, 2019, 10:55am
10
Forsikring its = TRYG FORSIKRING; its just a variable that i have made. I want to assign what ever i get from the pdf in that field to the variable Forsirking. Like TRYG FORSIKRING can be another value on another pdf file, but will be in same postion at all time. Its Insurance btw
RobertD
(Docan Robert)
June 14, 2019, 10:56am
11
Why not use match activity? The text you’re willing to get will always be between BANK and IBAN?
rkelchuri
(ER.Krishna)
June 14, 2019, 10:59am
12
InStr function also will work for PDF output data verification to identify correct PDF.
InStr(UCase(str),“TRYG FORSIKRING”)<>0 → pass this in If condition
langsem
(Langsem)
June 14, 2019, 11:10am
14
in other term, TRYG FORSIKRING its the name of the insurance and will not always be TRYG FORSIKRING on another pdf it could be CODAN , IF, GJENSIDIGE etc
langsem
(Langsem)
June 14, 2019, 11:11am
15
Yes sometimes there can be no text there, also. So can be two conditions. One with isurance name and one without