cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SDainius
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
v-bacao-msft
Community Support
Community Support

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

6 REPLIES 6
WDRC
Helper V
Helper V

@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

 

 

 

SDainius
Frequent Visitor

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

 

 

v-bacao-msft
Community Support
Community Support

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.
kmw1130
Post Prodigy
Post Prodigy

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

Hello Kim,

I am looking into same functionality for my maintenance needs. Did you end up utilizing power automate? Any help would be appreciated.

 

aovoian@gmail.com

Thanks 

kmw1130
Post Prodigy
Post Prodigy

@NOTgrounded What I ended up doing was I created a scheduled flow that runs on the 1st of each month, it gets the items in a list that is filtered on which ones to create a Planner task for, then it creates an item in a SharePoint list.  Then I have a flow that when a Task is completed it updates the SharePoint list with the completed task info.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,563)