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 Platform Community / Forums / Power Automate / Adding different numbe...
Power Automate
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 
Categories:
I have the same question (0)
  • Verified answer
    wskinnermctc Profile Picture
    6,519 Moderator on at

    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.

  • MarcoS4 Profile Picture
    4 on at

    Thank you wskinnermctc,

     

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

     

    Much appreciated

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard