How to dynamically create records from one master list to another using Flow.
To fulfill this requirement, we first create a schedule master list which is having some items such as: (refer Image 1)
Image1
Sample values of data: (refer image 2)
Image2
Now, we create preventive documents list with following columns: (refer image3)
image3
Now, we create a Microsoft Flow to create these schedule records:(refer image4)
image4
This is the condition where we have to check today`s date with last created date
Formula in condition is when we clicked on advanced mode:
@equals(formatDateTime(utcNow(), 'MM-dd-yyyy'), formatDateTime(items('Apply_to_each')?['NextCreationDate'], 'MM-dd-yyyy'))
image5
Now, if the condition is met then we have to follow these below steps else we do nothing.(refer image6)
image6
Here, I am explaining all steps (refer image 7)
image 7
addDays formula is :
addDays(items('Apply_to_each')?['NextCreationDate'],int(items('Apply_to_each')?['DaysGap']))
LastCreatedOn : formatDateTime(utcNow(),'MM-dd-yyyy')
NextcreationDate: formatDateTime(variables('varNextCreatedDate'),'MM-dd-yyyy')
This flow now runs on everyday and find records in ScheduleMaster list which is required to be created on today and then update LastCreatedOn as of date created and sets the next creation date by adding days which is specified.
Comments
-
How to dynamically create records from one master list to another using Flow.
* This solution can attach all attachments too from one master list to another.
*This post is locked for comments