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 / 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)
  • 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

  • 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.

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
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
trice602 Profile Picture

trice602 228 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 188 Most Valuable Professional

Last 30 days Overall leaderboard