cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

How to split a file name in pieces

Hello everybody,

 

I have a file name which looks like this:

 

ProductCode_ProductName_ABC

 

I need to split it in 3 pieces, which I want to use in an Update File Properties.

 

I have read about the split function, but I don't know how to start it.

 

Thank you for your kind assistance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to split a file name in pieces

 

Hi @claudia ,

 

Please try to refer to the method provided by @MinRao to achieve your requirements.

Spoiler
131.PNG

If the file name contains an extension, you can replace the expression in Split with the following:

split(first(split(outputs('Compose'),'.')),'_')

 

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Resolver II
Resolver II

Re: How to split a file name in pieces

You can store each piece to variable like following 

 

   

split('ProductCode_ProductName_ABC','_')[0]

 

split.png

 

Highlighted
Community Support
Community Support

Re: How to split a file name in pieces

 

Hi @claudia ,

 

Please try to refer to the method provided by @MinRao to achieve your requirements.

Spoiler
131.PNG

If the file name contains an extension, you can replace the expression in Split with the following:

split(first(split(outputs('Compose'),'.')),'_')

 

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (9,330)