cancel
Showing results for 
Search instead for 
Did you mean: 
panand99

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)

Image1Image1

 

Sample values of data: (refer image 2)

Image2Image2

Now, we create preventive documents list with following columns: (refer image3)

image3image3

Now, we create a Microsoft Flow to create these schedule records:(refer image4)

image4image4

image4_1.png

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'))

image5image5

Now, if the condition is met then we have to follow these below steps else we do nothing.(refer image6)

image6image6

Here, I am explaining all steps (refer image 7)

image 7image 7

image7_1.pngimage7_2.png

addDays formula is :

addDays(items('Apply_to_each')?['NextCreationDate'],int(items('Apply_to_each')?['DaysGap']))

image8.png

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