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 Automate
Answered

Split string

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello all, 

 

I want to extract just the name of the csv file without the extension in flow. 

 

e.g. name.csv > name 

 

Can someone guide on how I can achieve this using split function? 


Thank you in advance!  

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi,

     

    first(split('Test.csv','.'))

     

    Thanks

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous 

     

    Here it is

     

    image.png

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

     Hi @abm 

     

    Thank you for your response. 

     

    I'm basically grabbing the file name from the trigger 'when file is created' and passing the name as a table name in list all rows action. 

    Is this even an option? 

     

     

    flow.jpg

     

     

     
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous

     

    What error you are getting? Also make sure the expression split is added under the Expression tab. I can see it is under the Dynamic Content.

     

    Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    flow2.jpgWhen I enter the FileName this is what the expression turns into. 

     

    first(split(variables('triggerOutputs()['headers']['x-ms-file-name-encoded']'),'.'))
     
    The error is that the expression is invalid. 

    Best,
    Annie Jamshed
  • Verified answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous 

     

    Please check my earlier post. Here I declared a variable called Filename then value as Test.csv. Then I used the split().

     

    image.png

     

     

    In your case you have 

    first(split(variables('triggerOutputs()['headers']['x-ms-file-name-encoded']'),'.'))

     

    Not sure this is correct.

     

    You can move the triggerOutputs()['headers']['x-ms-file-name-encoded'] under the initialise value part.

     

    Then map the variable under the expression.

     

    Thanks

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @abm 

     

    It worked! 

     

    I was able to parse the name correctly but for some reason my flow is failing saying no table name was found even though the table exists with that name! 😞

     

    I'll take that up on another thread though. Thanks for your help!!

     

    Best,

    Annie

     

    Best,

    Annie Jamshed

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard