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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors