Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Adding multiple entries in SharePoint with incremental dates

(1) ShareShare
ReportReport
Posted on by 2
I have two SharePoint lists. SharePoint List -1 & SharePoint List 2.
 
SharePoint List -1 - receives its input from a Power App. These inputs have data such as Task name, start date, End Date, and number of days (End Date - Start date).
 
Once this input is received from the power apps - It is updated in SharePoint list 1.
 
Based on the No.of days count in SharePoint 1 - I want to create multiple entries in another SharePoint list (SharePoint 2). Each entry in SharePoint 2 should have the same data as the original entry but with the start date incremented by one day for each subsequent entry, continuing until the end date is reached.
 
Can anyone please help me with how I can achieve it using Power Automate?
 
Thanks in advance!
Categories:
  • Suggested answer
    abc 123 Profile Picture
    abc 123 724 on at
    Adding multiple entries in SharePoint with incremental dates
    Trigger: OnCreate  (I would only do with new items, not OnUpdate)
     
    Initialize Variable: Integer - intLoopCount* = 1
    Initialize Variable: Text  - txtNextDate = StartDate (<--field from list)
     
    Do Until: intLoopCount > NumberOfDays (<--Field from list)
       Create Item: 
                  {Add all of the columns that need populated, and use txtNextDate}
       
       Add Days: (Use this action to calculate the next day.)
       Set Variable: txtNextDate = Value calculated in Add Days
     
       Increment Variable: intLoopCount, 1
    //End Loop
    //End Trigger
     
    *You don't really NEED to use the loop counter integer, as you could probably key the loop simply off the Dates, but the integer might be cleaner.
     
  • Nived_Nambiar Profile Picture
    Nived_Nambiar 17,076 on at
    Adding multiple entries in SharePoint with incremental dates
    Hi,
     
    one conformation needed- does the data in sharepoint list 2 - should have these columns - task name, start date, end date and number of days as well where only start date changes ?
     
     

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,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard