Hi all,
I need assistance with this, i am importing data from a SharePoint list like this:
Here i have DATE, Well(uniqueID in each date), Responable, Petroleo and Agua.
As you can see there are plenty of items by date, i am trying to make a flow with PowerAutomate which look up for all elements at the last date, then duplicate and finally update that date addind one day. So after the flow, i wish to have this:
As you can see, only was duplicated the items that are in the last date in the list( orange box to green box) and then this date was update adding 1 day more.
I try to create a flow like this:
1.- First get the items:
2.- Then i define an If condition, where just select the items that have the last date in the list:
3. If true, it creates that item, duplicate all values in rows but change the date adding 1 day and added to the same sharepoint list.
These is the code:
These is the result:
I get no result, i think that i am defining in bad way tha max date. Can you help me?
Hi @NEZ-AL ,
My SharePoint List Before:
My SharePoint List After:
I did a test for your reference.
In my scenario:
Please switch to classic designer.
My Flow:
Please use the sort function to sort the Date column of the items in Get items from small to large, and last gets the largest date.
Filter out items whose Date is equal to the maximum date in the Filter array, update the dates of the filtered items, and use the AddDays function to add one day to the maximum date.
last(sort(outputs('Get_items')?['body/value'],'Date'))['Date']
items('Apply_to_each')?['Id']
items('Apply_to_each')?['Title']
AddDays(items('Apply_to_each')?['Date'],1,'yyyy-MM-dd')
Best Regards,
Sunshine Gu
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional