Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Adding different number of days

(0) ShareShare
ReportReport
Posted on by 4

Hello All

 

I am totally new to Power Automate and need some help please.

 

I have created a contract management system using sharepoint list and created a flow to remind users 30 days in advance of the "termination date". This works using this expression 

formatDateTime(addDays(utcNow(),30),'yyyy-MM-dd')
Some contracts need to be negotiated 30,60,90.....days before termination date. I have added a column "Termination Notice" to my sharepoint list which contains the number of days prior to the termination date that the notification must go out but my question is, how do i get my flow to recognize that it needs to send the notification either 30,60,90.... days before the termination date?
 
I hope this makes sense.
Thanks 
  • MarcoS4 Profile Picture
    4 on at
    Re: Adding different number of days

    Thank you wskinnermctc,

     

    This worked for me. The only change was to put 'AND' in all lowercase.

     

    Much appreciated

  • Verified answer
    wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on at
    Re: Adding different number of days

    You just need to combine the filter using AND OR and wrap each in parentheses ().

     

    (Statement AND statement) OR (Statment2 AND Statement2)

     

    If your TerminationNotice is a number type column then the number is by itself without ' single ' quotes:

    (TerminationDate eq 'formatDateTime(addDays(utcNow(),30),'yyyy-MM-dd')' AND TerminationNotice eq 30) OR
    (TerminationDate eq 'formatDateTime(addDays(utcNow(),60),'yyyy-MM-dd')' AND TerminationNotice eq 60) OR
    (TerminationDate eq 'formatDateTime(addDays(utcNow(),90),'yyyy-MM-dd')' AND TerminationNotice eq 90)

     

    If your TerminationNotice column is a single line text then the numbers need ' single ' quotes:

    (TerminationDate eq 'formatDateTime(addDays(utcNow(),30),'yyyy-MM-dd')' AND TerminationNotice eq '30') OR
    (TerminationDate eq 'formatDateTime(addDays(utcNow(),60),'yyyy-MM-dd')' AND TerminationNotice eq '60') OR
    (TerminationDate eq 'formatDateTime(addDays(utcNow(),90),'yyyy-MM-dd')' AND TerminationNotice eq '90')

     

    Try this in your Filtery Query.

    wskinnermctc_0-1693923320225.png

     

    Just make sure the spaces are correct and doesn't use line breaks.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,601 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,942 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow