cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HeavyOne
New Member

Filtering attachments by name without spaces

Hello there,

 

I would like to filter incoming attachments by name. I can't get it to work, because attachment names are without spaces and I'd like to filter that.

 

For example, the attachments have name like this: 

"Crystal_StagingWeek2V5_Fri15Apr-Sun17Apr"

"Crystal_StagingWeek2V5_IndivdualArtistFri15Apr"

 

I would like to create file in Sharepoint only for first type of attachments. I would like to NOT recieve files with word "individual".

 

My current flow looks like this:

 

Screen Shot 2022-04-15 at 12.52.48.png

 

Many thanks!! 

2 ACCEPTED SOLUTIONS

Accepted Solutions
ScottShearer
Super User
Super User

@HeavyOne 

See my example condition below:

image.png

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

ScottShearer
Super User
Super User

@HeavyOne 

Please see this blog post as I believe that it will provide a solution.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

6 REPLIES 6
ScottShearer
Super User
Super User

@HeavyOne 

See my example condition below:

image.png

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

@HeavyOne 

Hey there, I actually think you are very close.  I just made a condition to check if the attachment name 'contains' the string:

edgonzales_0-1650043061775.png

I wasn't sure if the condition is case sensitive or not, so notice that the dynamic value is wrapped in a tolower() to make the whole thing lower-case, and then compare it to my check that is also all lower case.

 

One thing to note:  I ran through this a couple of times and couldn't figure out why it wasn't working until I saw that "Individual" is misspelled in the attachment name example you gave: "Crystal_StagingWeek2V5_IndivdualArtistFri15Apr" (it's missing an i).  So if you're spelling it correctly in your condition, it won't ever match.

 

Keep us posted.

-Ed

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Thanks Scott!

That works just fine 🙂

HeavyOne
New Member

Actually ..... something is still wrong.

 

Yes, I can filter the attachments, so I'm getting only one pdf, but somehow I can't open it.

 

When I upload same pdf manually, I can preview it.

 

Screen Shot 2022-04-15 at 13.41.01.png

ScottShearer
Super User
Super User

@HeavyOne 

Please see this blog post as I believe that it will provide a solution.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
HeavyOne
New Member

That is exactly what I needed! Many thanks! @ScottShearer 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,017)