Forum

Notifications
Clear all

PDF upload error

7 Posts
2 Users
0 Reactions
199 Views
(@lanser)
Posts: 61
Estimable Member
Topic starter
 

Hi Me Again

I have got my pdfs uploading from a folder and working fine filtered for the files I need and combining the 1st and 2nd pages but when a file with only one page added (supposedly filtered out by name containing "EIRE") the query that pulls the second page in fails, the transform sample query gives the error below if I remove the single page file it works again.

Expression.Error: The key didn't match any rows in the table.
Details:
Key=
Id=Page002
Table=

Eventually I intend to extract the data from the "Eire" files and append the the main table once I get this bit working

 
Posted : 08/01/2021 12:53 pm
(@catalinb)
Posts: 1937
Member Admin
 

Hi John,
you should separate the queries for page 1 and 2. For page 2, catch the error with: try...otherwise .

Should be something like: try GetData(page2) otherwise #table( Table.ColumnNames(Page1), {} )

This way, instead of an error, you will get an empty table if page 2 is not in the file.

 
Posted : 09/01/2021 12:09 pm
(@lanser)
Posts: 61
Estimable Member
Topic starter
 

Hi Catalin,

I have split the query and will add the try otherwise error catch.

I just dont see how the Orders_Page2 query errors out when I thought I had already filtered out the single page "EIRE" files at source before the Transform query kicks in

 
Posted : 09/01/2021 1:12 pm
(@catalinb)
Posts: 1937
Member Admin
 

Use the Go To Error button that shows up in Transform sample2 query. Will highlight [id="Page002"]

Even you are filtering, automatic transformation steps remains as they are, they will not follow any other changes, they are not flexible.

Even if you filtered  out the page, that page is hard written into the query and is still trying to perform operations on that page

Use try -otherwise in that query

 
Posted : 10/01/2021 12:17 am
(@catalinb)
Posts: 1937
Member Admin
 

22.jpg

 
Posted : 10/01/2021 1:18 am
(@lanser)
Posts: 61
Estimable Member
Topic starter
 

Thanks Catalin didnt know that despite filter it hardcodes and also try/otherwise is a new one for me.

Now I just have to get the way the .pdf report is produced, locked down as latest one has an extra column :GrrrrrCry

 
Posted : 12/01/2021 8:12 am
(@lanser)
Posts: 61
Estimable Member
Topic starter
 

Hi,

This has been working fine until a third page was added, now the transform sample file (2) is blank and the query gives a couple of errors

Expression.Error: The column '' of the table wasn't found.

Details:

details are blank and when I goto error I get this.

Expression.Error: The field '' of the record wasn't found.
Details:
Source.Name=01.07.2021
Column1=
Column2=
Column3=
Column4=
Column15=
Attribute=
Value=
Attribute - Copy=

I can't see what needs to be changed in the try/let to make it work

 

John

 
Posted : 06/07/2021 7:59 am
Share: