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 / flow to put into appro...
Power Automate
Unanswered

flow to put into appropriate fiscal year folder in document library

(0) ShareShare
ReportReport
Posted on by

I'm looking to set up a flow that determines which fiscal year (which starts after September 30 each year) a date column falls under, then place that item in the appropriate fiscal year folder in a document library. For example, if the date is 7/15/24, it will go into the Fiscal Year 24 folder of the document library. Is there a way to set this up without doing a conditional for each fiscal year?

Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at

    You will need to adapt this to your specific needs, but you can try this:

    David_MA_0-1718908562642.png

    The expression in the condition is the following. Replace triggerBody()['date'] with the dynamic date value that determines the fiscal year. It will return a number for the month. If it returns 1-8 it is the current fiscal year, otherwise it is the following fiscal year.

     

    int(formatDateTime(triggerBody()['date'],'MM'))

     

    For the folder path expression, use the following for the current year:

     

    concat('/fiscalyear/', formatDateTime(triggerBody()['date'],'yyyy'))

     

    Note: first use the folder picker to select the document library on your SharePoint site, and then paste that into the expression. For example, the document library I tested this on is 'fiscalyear'; be sure to include the backslashes.

     

    For the next fiscal year, use this expression:

     

    concat('/fiscalyear/', string(add(int(formatDateTime(triggerBody()['date'],'yyyy')),1)))

     

    Again, do the same as above for the document library and folder path. This expression gets the current year and adds 1 to it.

  • bottledutopia Profile Picture
    on at

    Thanks for the response. With this flow, I would only be able to categorize the current and next fiscal year, correct? Is there a way to set up more than two years without setting up a conditional for each year?

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard