Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
RicardoV2
Frequent Visitor

Opening several PDFs from a Sharepoint site,and validating filled fields on different areasOfEachPDF

Hello,

I need to get a list of PDFs from a Sharepoint site, and iterate through them to validate if some fields are filled.

Till now i have this code:

let
Source = SharePoint.Files("https://xxx.sharepoint.com/sites/RDActivities231", [ApiVersion = 15]),
#"Filtered Rows" = Table.SelectRows(Source, each ([Extension] = ".pdf")),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Date accessed", "Extension"}),
#"Reordered Columns" = Table.ReorderColumns(#"Removed Columns",{"Name", "Folder Path", "Date modified", "Date created", "Attributes", "Content"}),
#"Filtered Rows1" = Table.SelectRows(#"Reordered Columns", each [Name] <> "R&D–InstructionsBench.pdf"),
#"Removed Columns1" = Table.RemoveColumns(#"Filtered Rows1",{"Attributes", "Date modified", "Date created"}),
#"Sorted Rows" = Table.Sort(#"Removed Columns1",{{"Name", Order.Ascending}})
in
#"Sorted Rows"

And this is the result:

p1.png

 

What I need to do now and can't seem to find a way on the interface, is to open and "disaggregate" the binary content from each row, in a way to get to the several PDF content "areas" while maintaining the previous columns.

 

Naturally, when I double click on one line, I just open 1 row (=1PDF, and I want all rows/PDFs), but i also lose the "previous" columns and I'm only getting to open one specific area, as for example the highlighted area in yellow "Table001 (Page 1)" area, as you can see on the next image.

 

P2.png

 

Can you help me?

Thanks in advance

1 REPLY 1
lbendlin
Super User
Super User

Run the process for one of the PDFs, then look at the produced code and outsource that to a function.  Then delete the steps again and add a custom column based on your function.

 

Some advice: 

- Use Table.SelectColumns rather than Table.RemoveColumns. 

- Do not sort rows. Do not reorder columns.  Neither of these actions are necessary in your scenario, all they do is waste time.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.