web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Finding Filename Subte...
Power Automate
Answered

Finding Filename Subtexts Within PDF

(0) ShareShare
ReportReport
Posted on by 10

I am working on a subflow that needs to find every filename of variable character length within a specified PDF file. Each filename is preceded by 'file#:' and is followed by '/', though '/' also occurs in other places within the document. ex: file#: 1234-56-78A/.

 

So far I have tried the following which is not working:

Parse text for 'file#' stored into FileStartPostions

For each CurrentItem in FileStartPositions{

Parse text for '/' starting at position CurrentItem and find the first occurrence only, store into endOfName

Get subtext starting at character CurrentItem with length CurrentItem - endOfName

}

 

I am getting an Error saying CurrentItem - endOfName must be an integer.

I'm new to Power Automate, any suggestions?

I have the same question (0)
  • WorkingForFood Profile Picture
    99 on at

    Are you using an integer for the Character Position input of the activity Get subtext? That could explain the error you are getting.

     

    On a separate note, if your string of file names is like this "#file123filename/#fileotherfile" then you could first split the data by "/#file" and then remove the first reference to #file. That said, it's hard to know without seeing your data or flow. 

  • Verified answer
    LionGate Profile Picture
    10 on at

    Thanks, I realized that I was entering it wrong. I was using %endOfName% - %CurrentItem% instead of %endOfName - CurrentItem% 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 840

#2
Valantis Profile Picture

Valantis 661

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard