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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Split period-separated...
Power Automate
Unanswered

Split period-separated strings and concatenate them

(0) ShareShare
ReportReport
Posted on by 7

Hello I am using Microsoft Flow and I'm trying to autopopulate a column field in SharePoint.

 

I have a CSV file with filename in this date format YYYY.MM.DD.csv. When a user saves the CSV file to the SharePoint library, it should automatically update a text column called 'DataString' with string YYYYMMDD (without the periods) based from the filename. The said column is being used in a calculated column for grouping the documents. How do I do this in Flow?

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-yuazh-msft Profile Picture
    on at

    Hi @Theresa_SPAdmin,

     

    I would offer you the workaround to get the string YYYYMMDD from the file name YYYY.MM.DD.csv,please refer to screenshot below to create the flow:

    Capture.PNG

     

    The expression in the Compose 2 as below:

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

    The expression in the Compose 3 as below:

    split(outputs('Compose_2'),'.')

    The expression in the Compose 4 as below:

    concat(first(outputs('Compose_3')),first(skip(outputs('Compose_3'),1)),last(outputs('Compose_3')))

    The flow would run successfully as below:

    Capture.PNG

     

    Or you could combine the expression in only one action and you cold create the flow as below:

    Capture.PNG

    The expression in the Compose 2 as below:

    concat(first(split(first(split(outputs('Compose'),'.csv')),'.')),first(skip(split(first(split(outputs('Compose'),'.csv')),'.'),1)),last(split(first(split(outputs('Compose'),'.csv')),'.')))

     

    The flow would run successfully as below:

    Capture.PNG

     

    Best regards,

    Alice

     

     

     

  • Theresa_SPAdmin Profile Picture
    7 on at

    Thank you so much, Alice! It works like a charm!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard