cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Maintenance Tasks

Hello,

 

I want to create a maintenance plan with cycle:

  1. When the maintenance plan "DueDate" is current Date the item must be created in the next list (Tickets), with "StartDate" and "Title" from maintenance plan
  2. Maintenance plan Item "Start Data" must be changed to DuoDate.

Maybe anybody can have good Ideas how realize  this idea with Flow?

 MaintenacePlan.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Maintenance Tasks

Hi @SDainius,

 

I am afraid I don't know how the calculated column-DueDate was created, so I can't directly determine the cause of the error.

I did a test on my side, maybe you could use it as a reference.

  • Create a calculated column of type Date, using the value of the StartDate field plus the value of the Recurrence field.
  • Use Get items to get all the items, configure Condition to determine whether DueDate is equal to utcNow().
  • Here we need to use formatDateTime() function to format the date into the same format for easy comparison.
  • If the condition is true, create a new item in another list and update the current item.

Expression:

@equals(formatDateTime(items('Apply_to_each')['DueDate'], 'yyyy-MM-dd'), utcNow('yyyy-MM-dd'))

Image reference:

22.PNG20.PNG

The Dynamic content configured here is from the Get items action.

21.PNG

Please take a try again.

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Helper V
Helper V

Re: Maintenance Tasks

@SDainius

 

That should not be an issue, I would suggest you do the following:

 

  • Use a recurrence and do this daily at a set time acording to your time zone
  • Then get items from IT Main Plan
  • Insert a condition for today's date you will need an expression for that
  • Then update items in the from the IT main plan into IT tickets 

 

Hope that helps, I am not an expert myself but will send you the expression if you think the above helps.

 

If you can post a picture of the flow you create then we can solve this one together.

 

Regards

 

Andrew

 

 

 

Highlighted
Frequent Visitor

Re: Maintenance Tasks

Thank you, works well but only if maintenace date "DueDate" is normal date field. I can't to do with calculated "DueDate" field. With calculated field "DueDate" I got Error

InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2540': 'The template language function 'substring' expects its first parameter 'string' to be a string. The provided value is of type 'Null'. Please see 

 

My flow is:

Capture.JPG

 

 

Highlighted
Community Support
Community Support

Re: Maintenance Tasks

Hi @SDainius,

 

I am afraid I don't know how the calculated column-DueDate was created, so I can't directly determine the cause of the error.

I did a test on my side, maybe you could use it as a reference.

  • Create a calculated column of type Date, using the value of the StartDate field plus the value of the Recurrence field.
  • Use Get items to get all the items, configure Condition to determine whether DueDate is equal to utcNow().
  • Here we need to use formatDateTime() function to format the date into the same format for easy comparison.
  • If the condition is true, create a new item in another list and update the current item.

Expression:

@equals(formatDateTime(items('Apply_to_each')['DueDate'], 'yyyy-MM-dd'), utcNow('yyyy-MM-dd'))

Image reference:

22.PNG20.PNG

The Dynamic content configured here is from the Get items action.

21.PNG

Please take a try again.

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper IV
Helper IV

Re: Maintenance Tasks

I'm wanting something similar to a Maintenance Tasks list.  The first Monday of each Month the owner needs to review their maintenance list item(s), complete a task that it has been reviewed for the month.  I need a record that they reviewed their item each month for our Quality Department.  Should I create a separate list to track each month's review or can it be done in the same list?

 

thanks

Kim

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,799)