Skip to main content

Notifications

Power Automate - Building Flows
Answered

Add 49 days to multiple dates

(0) ShareShare
ReportReport
Posted on by 8
Hi All
 
I am creating a flow and getting all the data from lists.
 
What I want to do is add 49 days but there are multiple dates, so in essence I want a formula that will look at each individual date and add 49 days from them dates
 
For example
 
21/10/1988 + 49
23/11/1988 + 49 etc
  • Verified answer
    WS-07010823-0 Profile Picture
    WS-07010823-0 8 on at
    Add 49 days to multiple dates
    Hi
     
    This flow has worked thank you, however there is a bit of an issue.
     
    Just say for example I have a record that is 49 days past the complaint date recieved a flow will be acitvated and an email will be sent, however it is sending an email ever single day which i didnt want haha.
     
    All i want it to do is have a look for complaints that are 49 days overdue TODAY and forget the rest.
  • rzaneti Profile Picture
    rzaneti 3,427 on at
    Add 49 days to multiple dates
     
    I just want to confirm if you had a chance to test the solution recommended in my previous message.
     
    If it's working properly and answered your question, please mark it as Accepted Answer, so other users with the same issue can find it easily in the future :)
     
     
    -------------------------------------------------------------------------
  • Suggested answer
    rzaneti Profile Picture
    rzaneti 3,427 on at
    Add 49 days to multiple dates
    Hello,
     
    Of course! Here is a quick demo on how to capture the data from a SharePoint List based on a few conditions (status, compliant type and received older than 49 days) and send an email for each of them.
     
    For this example, I'm working with the following SP List, and will filter it by status = Open, CompliantType = Order and ReceivedAt older than 49 days:
     
     
    I'm using a manual trigger, but the logic is the same if you set up a scheduled flow. Right after the trigger, you must use a Get items action to retrieve the records from your SP List, and filter it accordingly in the Filter Query field (highlighted in green). As you can see below, for Status and CompliantType, which are both choice type columns, I'm simply writing their name, using the eq operator (which corresponds to "equals to") and passing the desired choice labels between single quotes (respectively 'Open' and 'Order). For ReceivedAt, which is a date type column, I'm passing its name, the lt operator (which corresponds to "lower than") and using the expression addDays(utcNow(), -49) to determine the date to be used in the filter (49 days before today), as highlighted in red:
     
    You may also notice that the three conditions are separated by and statements (highlighted in yellow). Make sure to also enclose the addDays() expression between single quotes in the Filter Query. 
     
    At this point, Power Automate is retrieving only 2 records from the List (Poor packing and Missing items) in an array format, since those are the only ones that match the 3 filters that we've set. We now need to iterate this array and send an email to the manager for each of them. To achieve it, you need to add an Apply to each action and pass the dynamic content of value property from Get items action as input, like highlighted below. Within your Apply to each,  add a Send an email action (in my case, I'm using a slightly different action, since the email will be sent from a shared mailbox rather than an individual one) and populate it as you wish:   
     
    Both in the email subject line and body you can combine static texts with dynamic contents, just like I did for the "Title" and "Description" of the complaints. You can also insert expressions within these inputs if needed. 
     
    After saving an testing it, the flow runs successfully and the Apply to each identifies only 2 records for iteration: 
     
    And the "Manager" receives one email for each of the List records that match the filter criteria: 
     
     
    Additional content
    I'm also sharing a few resources related to the topics discussed in this solution, which can be helpful for you or any users that find this thread in the future.
    - Video: Dynamic contents in Power Automate: https://youtu.be/jpledJfaEPQ
     
    Let me know if it works for you or if you need any additional help!

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Accepted Answer.
    If this answer helps you in any way, please give it a like.

    http://digitalmill.net/
    https://www.linkedin.com/in/raphael-haus-zaneti/
  • WS-07010823-0 Profile Picture
    WS-07010823-0 8 on at
    Add 49 days to multiple dates
    Thank you for your answer
     
    Would you be able to provide a flow example for what i need.
     
    I would like to SCHEDULE a flow, that looks at my complaints tracker and when the date reaches 49 days from the column "DATECOMPLAINTRECIEVED" 
     
    The "STATUS" needs to be "Open"
    The "COMPLAINT TYPE" needs to be "SCHEDULE 3 (PSB)"
     
    I would like it to send an email, to lt the supervisors know
  • Suggested answer
    rzaneti Profile Picture
    rzaneti 3,427 on at
    Add 49 days to multiple dates
    Hi,
     
    You can use the expression addDays([your_date_property], 49), where [your_date_property] must be replaced for the individual date column for each of your SP List items. To apply this formula to each record from your list, you can use an Apply to each loop within your flow, passing the value property from a Get Items action as input.
     
    For more details about these two steps, you can check the following blogs that I wrote:
    - Using loops and accessing array elements in Power Automate: http://digitalmill.net/2023/07/12/using-loops-and-accessing-array-elements-in-power-automate/
     
    If you find trouble to implement it in you flow, let me know and I can provide you a more detailed step-by-step on how to read data from SharePoint and apply the logic for each record. 
     
    Let me know if it works for you or if you need any additional help!

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Accepted Answer.
    If this answer helps you in any way, please give it a like.

    http://digitalmill.net/
    https://www.linkedin.com/in/raphael-haus-zaneti/

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard