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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 266 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 160 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 134 Super User 2026 Season 2

Last 30 days Overall leaderboard